<?php
/**
 * Traveler Booking functions
 */

if ( ! function_exists( 'traveler_booking_setup' ) ) :
function traveler_booking_setup() {

    load_theme_textdomain( 'traveler-booking', get_template_directory() . '/languages' );

	// Set up the WordPress core custom background feature.
    add_theme_support( 'custom-background', apply_filters( 'traveler_booking_custom_background_args', array(
	    'default-color' => 'ffffff',
	    'default-image' => '',
    ) ) );
    
	/**
	 * TGM
	 */
	require get_template_directory() . '/tgm.php';

	/**
	 * About Theme Function
	 */
	require get_theme_file_path( '/about-theme/about-theme.php' );
	/**
	 * Customizer
	 */
	require get_template_directory() . '/inc/customizer.php';
}
endif; 
add_action( 'after_setup_theme', 'traveler_booking_setup' );

if ( ! function_exists( 'traveler_booking_styles' ) ) :
	function traveler_booking_styles() {
		// Register theme stylesheet.
		wp_register_style('traveler-booking-style',
			get_template_directory_uri() . '/style.css',array(),
			wp_get_theme()->get( 'Version' )
		);

		// Enqueue theme stylesheet.
		wp_enqueue_style( 'traveler-booking-style' );

		wp_style_add_data( 'traveler-booking-style', 'rtl', 'replace' );

		// Enqueue dashicons
		wp_enqueue_style( 'dashicons' );

		// Enqueue scroll to top CSS
		wp_enqueue_style( 'scroll-to-top-style',
			get_template_directory_uri() . '/assets/css/scroll-to-top.css',
			array(),
			wp_get_theme()->get( 'Version' )
		);

		// Enqueue scroll to top JS
		wp_enqueue_script( 'scroll-to-top-js',
			get_template_directory_uri() . '/assets/js/scroll-to-top.js',
			array(),
			wp_get_theme()->get( 'Version' ),
			true
		);
	}
endif;
add_action( 'wp_enqueue_scripts', 'traveler_booking_styles' );