<?php
/**
 * IT Services Management functions
 */

//Admin css
add_editor_style( array( 'assets/css/admin.css' ) );

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

    load_theme_textdomain( 'it-services-management', get_template_directory() . '/languages' );	

	// Set up the WordPress core custom background feature.
    add_theme_support( 'custom-background', apply_filters( 'it_services_management_custom_background_args', array(
	    'default-color' => 'ffffff',
	    'default-image' => '',
    ) ) );

	/**
	 * 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', 'it_services_management_setup' );

if ( ! function_exists( 'it_services_management_styles' ) ) :
	function it_services_management_styles() {
		// Register theme stylesheet.
		wp_register_style('it-services-management-style',
			get_template_directory_uri() . '/style.css',array(),
			wp_get_theme()->get( 'Version' )
		);

		// Enqueue theme stylesheet.
		wp_enqueue_style( 'it-services-management-style' );

		// 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
		);

		wp_enqueue_script( 'it-services-management-custom-script', get_theme_file_uri( '/assets/js/custom-script.js' ), array( 'jquery' ), true );

		wp_style_add_data( 'it-services-management-style', 'rtl', 'replace' );
	}
endif;
add_action( 'wp_enqueue_scripts', 'it_services_management_styles' );