array( 'color' ), 'frontpage' => array( 'banner', 'about', 'blog' ), 'general' => array( 'post-page', '404-page', 'seo' ), ); foreach( $travel_booking_panels as $p ){ require get_template_directory() . '/inc/customizer/panels/' . $p . '.php'; } foreach( $travel_booking_sections as $s ){ require get_template_directory() . '/inc/customizer/sections/' . $s . '.php'; } foreach( $travel_booking_sub_sections as $k => $v ){ foreach( $v as $w ){ require get_template_directory() . '/inc/customizer/panels/' . $k . '/' . $w . '.php'; } } /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function travel_booking_customize_preview_js() { wp_enqueue_style( 'travel-booking-customizer', get_template_directory_uri() . '/inc/css/customizer.css', array(), TRAVEL_BOOKING_THEME_VERSION ); wp_enqueue_script( 'travel-booking-customizer', get_template_directory_uri() . '/inc/js/customizer.js', array( 'customize-preview', 'customize-selective-refresh' ), '20151215', true ); } add_action( 'customize_preview_init', 'travel_booking_customize_preview_js' ); function travel_booking_customizer_scripts() { wp_enqueue_style( 'travel-booking-customize',get_template_directory_uri().'/inc/css/customize.css', TRAVEL_BOOKING_THEME_VERSION, 'screen' ); wp_enqueue_script( 'travel-booking-customize', get_template_directory_uri() . '/inc/js/customize.js', array( 'jquery', 'customize-controls' ), '20170404', true ); } add_action( 'customize_controls_enqueue_scripts', 'travel_booking_customizer_scripts' ); /* * Notifications in customizer */ require get_template_directory() . '/inc/customizer-plugin-recommend/customizer-notice/class-customizer-notice.php'; require get_template_directory() . '/inc/customizer-plugin-recommend/plugin-install/class-plugin-install-helper.php'; require get_template_directory() . '/inc/customizer-plugin-recommend/section-notice/class-section-notice.php'; $config_customizer = array( 'recommended_plugins' => array( 'travel-booking-toolkit' => array( 'recommended' => true, 'description' => sprintf( /* translators: %s: plugin name */ esc_html__( 'If you want to take full advantage of the features this theme has to offer, please install and activate %s plugin.', 'travel-booking' ), 'Travel Booking Toolkit' ), ), ), 'recommended_plugins_title' => esc_html__( 'Recommended Plugin', 'travel-booking' ), 'install_button_label' => esc_html__( 'Install and Activate', 'travel-booking' ), 'activate_button_label' => esc_html__( 'Activate', 'travel-booking' ), 'deactivate_button_label' => esc_html__( 'Deactivate', 'travel-booking' ), ); Travel_Booking_Customizer_Notice::init( apply_filters( 'travel_booking_customizer_notice_array', $config_customizer ) ); Travel_Booking_Customizer_Section::get_instance();