remove_section('colors'); $wp_customize->remove_section('background_image'); $wp_customize->remove_section('header_image'); $panels = rws_customizer_panels(); $sections = rws_customizer_sections(); // Adding Panels foreach ($panels as $rws_business_panels) { $wp_customize->add_panel( $rws_business_panels['id'], array( 'priority' => $rws_business_panels['priority'], 'title' => $rws_business_panels['title'], 'description' => $rws_business_panels['description'], ) ); } // Adding Sections foreach ($sections as $rws_business_sections) { if (empty($rws_business_sections['callback'])) { $rws_business_sections['callback'] = 'rws_business_default_callback'; } $wp_customize->add_section($rws_business_sections['id'], array( 'priority' => $rws_business_sections['priority'], 'title' => $rws_business_sections['title'], 'panel' => $rws_business_sections['panel'], 'active_callback' => $rws_business_sections['callback'], ) ); } require get_template_directory() . '/inc/customizer/init.php'; } add_action('customize_register', 'rws_customizer_options'); /** * Customizer defaults * @return array */ function rws_business_options_defaults() { $rws_business_options_defaults = array( 'top_header_display_bar' => true, 'top_header_text' => 'tagline', 'top_header_text_custom' => 'Free wordpress theme by Rws', 'top_header_display_social' => true, 'top_header_logo' => 'title', 'logo_custom_text' => 'Corporate Business By Rws', 'logo_custom_text_color' => '', 'logo_image' => get_template_directory_uri() . '/images/logo.png', 'slider_options' => 'first', 'slider_img_1' => get_template_directory_uri() . '/images/hero-unit.jpg', 'slider_img_2' => get_template_directory_uri() . '/images/hero-unit.jpg', 'slider_img_3' => get_template_directory_uri() . '/images/hero-unit.jpg', 'slider_img_heading_1' => 'Wordpress Themes', 'slider_img_heading_2' => 'Wordpress Themes 2', 'slider_img_heading_3' => 'Wordpress Themes 3', 'slider_img_text_1' => 'Helping your business grow', 'slider_img_text_2' => 'Helping your business grow', 'slider_img_text_3' => 'Helping your business grow', 'slider_img_btn_text_1' => 'Primary Button', 'slider_img_btn_text_2' => 'Primary Button', 'slider_img_btn_text_3' => 'Primary Button', 'slider_img_btn_link_1' => '#', 'slider_img_btn_link_2' => '#', 'slider_img_btn_link_3' => '#', 'slider_img_second_btn_text_1' => 'Secondary Buttons', 'slider_img_second_btn_text_2' => 'Secondary Buttons', 'slider_img_second_btn_text_3' => 'Secondary Buttons', 'slider_img_second_btn_link_1' => '#', 'slider_img_second_btn_link_2' => '#', 'slider_img_second_btn_link_3' => '#', 'about_sectionswitch' => true, 'about_excerpt_length' => 40, 'about_page' => '', 'about_section_btn_text' => 'Know Us More', 'image_1' => get_template_directory_uri() . '/images/about-us.jpg', 'image_2' => get_template_directory_uri() . '/images/about-us.jpg', 'image_3' => get_template_directory_uri() . '/images/about-us.jpg', 'blog_section_switch' => true, 'blog_excerpt_length' => 40, 'blog_section_title' => 'Recent Blog Posts', 'blog_bg_image' => '', 'blog_section_posts' => '', 'callto_action_section_switch' => true, 'callto_action_title' => 'You can use this module to display a banner box', 'callto_action_content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sodales vehicula odio quis lobortis. Aenean lacinia pulvinar hendrerit.', 'callto_action_btn_text' => 'View Details', 'callto_action_btn_link' => '#', 'callto_action_bg_color' => '', 'client_section_switch' => true, 'client_title' => 'Our Clients', 'client_image_1' => get_template_directory_uri().'/images/clients/wpml.png', 'client_image_2' => get_template_directory_uri().'/images/clients/florida.png', 'client_image_3' => get_template_directory_uri().'/images/clients/hazel.png', 'client_image_4' => get_template_directory_uri().'/images/clients/themegrade.png', 'client_image_5' => get_template_directory_uri().'/images/clients/woothemes.png', 'features_section_switch' => true, 'features_excerpt_length' => 35, 'features_section_title' => 'Features Of', 'features_section_title_two' => 'Corporate Business', 'features_first_item' => 'fa-coffee', 'features_second_item' => 'fa-twitter', 'features_third_item' => 'fa-code', 'features_first_item_page' => '', 'features_second_item_page' => '', 'features_third_item_page' => '', 'features_section_btn_text' => 'View All Services', 'features_section_btn_link' => '#', 'features_left_image' => get_template_directory_uri().'/images/services.jpg', 'rws_business_front_page' => 0, 'service_section_switch' => true, 'service_excerpt_length' => 15, 'first_item' => 'fa-lightbulb-o', 'second_item' => 'fa-rocket', 'third_item' => 'fa-comments-o', 'fourth_item' => 'fa-clock-o', 'first_item_page' => '', 'second_item_page' => '', 'third_item_page' => '', 'fourth_item_page' => '', 'testimonial_section_switch' => true, 'testimonial_excerpt_length' => 20, 'testimonial_select' => 'category', 'footer_section_switch' => true, 'footer_title' => 'Drop in unannounced.', 'footer_image' => '', 'footer_bottom_copyright_text' => ' © Copyright protected | All rights reserved', 'footer_bottom_menu' => true, 'footer_content_title' => 'Corporate Business', 'footer_content_address' => 'Main St New York, NY 10044', 'footer_content_email' => 'info@yoursite.com', 'footer_content_tel' => '+1 234 5678', 'footer_content_social_title' => 'Connect with us socially', 'footer_content_social_menu' => true, 'footer_content_form' => '', 'rws_business_heading_colors' => '', 'rws_business_icon_colors' => '', 'rws_business_primary_btn_color' => '', 'rws_business_secondary_btn_color' => '', 'rws_business_layouts' => 'right_sidebar', 'rws_business_custom_css' => '', 'rws_business_custom_js' => '', 'rws_business_sorting_1' => 'rws_business_service_section', 'rws_business_sorting_2' => 'rws_business_about_section', 'rws_business_sorting_3' => 'rws_business_features_section', 'rws_business_sorting_4' => 'rws_business_blog_section', 'rws_business_sorting_5' => 'rws_business_testimonial_section', 'rws_business_sorting_6' => 'rws_business_calltoaction_section', 'rws_business_sorting_7' => 'rws_business_client_section', ); return apply_filters('rws_business_options_defaults', $rws_business_options_defaults); } /** * Customizer values * @return array */ function rws_business_options() { $defaults = rws_business_options_defaults (); $rws_business_options = get_theme_mod( 'rws_business_options'); if ( empty ( $rws_business_options ) ){ $rws_business_options = array (); } $rws_business_options = array_merge( $defaults, $rws_business_options ); return $rws_business_options; } /** * Custom css and customizer css * @return string */ function rws_business_css_override () { $rws_business_options = rws_business_options (); ?>