get_home_url(), ); wp_localize_script( 'travel_agency_customize', 'tadata', $array ); } add_action( 'customize_controls_enqueue_scripts', 'travel_agency_customizer_scripts' ); /** * Sanitize callback for checkbox */ function travel_agency_sanitize_checkbox( $checked ){ // Boolean check. return ( ( isset( $checked ) && true == $checked ) ? true : false ); } /** * Sanitize callback for select */ function travel_agency_sanitize_select( $input, $setting ){ // Ensure input is a slug. $input = sanitize_key( $input ); // Get list of choices from the control associated with the setting. $choices = $setting->manager->get_control( $setting->id )->choices; // If the input is a valid key, return it; otherwise, return the default. return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); } /* * 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'; $travel_agency_config_customizer = array( 'recommended_plugins' => array( 'travel-agency-companion' => array( 'recommended' => true, 'description' => sprintf( esc_html__( 'If you want to take full advantage of the features this theme has to offer, please install and activate %s plugin.', 'travel-agency' ), 'Travel Agency Companion' ), ), ), 'recommended_plugins_title' => esc_html__( 'Recommended Plugin', 'travel-agency' ), 'install_button_label' => esc_html__( 'Install and Activate', 'travel-agency' ), 'activate_button_label' => esc_html__( 'Activate', 'travel-agency' ), 'deactivate_button_label' => esc_html__( 'Deactivate', 'travel-agency' ), ); Travel_Agency_Customizer_Notice::init( apply_filters( 'travel_agency_customizer_notice_array', $travel_agency_config_customizer ) ); Travel_Agency_Customizer_Section::get_instance();