<?php
 /**
 * Enqueue scripts and styles.
 */
function news25_scripts() {
	
	// Styles	
	wp_enqueue_style('tiny-slider',get_template_directory_uri().'/assets/css/tiny-slider.css');
	
	wp_enqueue_style('font-awesome',get_template_directory_uri().'/assets/css/fonts/font-awesome/css/font-awesome.min.css');
	
	wp_enqueue_style('magnific-popup',get_template_directory_uri().'/assets/css/magnific-popup.min.css');
	
	wp_enqueue_style('owl-carousel',get_template_directory_uri().'/assets/css/owl.carousel.min.css');
	
	wp_enqueue_style('bootstrap-min',get_template_directory_uri().'/assets/css/bootstrap.min.css');
	
	wp_enqueue_style('news25-editor-style',get_template_directory_uri().'/assets/css/editor-style.css');

	wp_enqueue_style('news25-default', get_template_directory_uri() . '/assets/css/color/default.css');

	wp_enqueue_style('news25-theme',get_template_directory_uri().'/assets/css/theme.css');

	wp_enqueue_style('news25-menus', get_template_directory_uri() . '/assets/css/menu.css');

	wp_enqueue_style('news25-widgets',get_template_directory_uri().'/assets/css/widgets.css');
	
	wp_enqueue_style('news25-block-widgets',get_template_directory_uri().'/assets/css/block-widgets.css');
	
	wp_enqueue_style('news25-lagecy-widgets',get_template_directory_uri().'/assets/css/lagecy-widgets.css');

	wp_enqueue_style('news25-main', get_template_directory_uri() . '/assets/css/main.css');
	wp_style_add_data('news25-main', 'rtl', 'replace');
	
	wp_enqueue_style('news25-media-query', get_template_directory_uri() . '/assets/css/responsive.css');

	wp_enqueue_style('news25-woocommerce',get_template_directory_uri().'/assets/css/woo.css');
	
	wp_enqueue_style('player', get_template_directory_uri().'/assets/css/plyr.css');
	
	wp_enqueue_style( 'news25-style', get_stylesheet_uri() );
	
	// Scripts

	wp_enqueue_script( 'jquery' );

	wp_enqueue_script('tiny-slider', get_template_directory_uri() . '/assets/js/tiny-slider.js');
	
	wp_enqueue_script('owl-carousel', get_template_directory_uri() . '/assets/js/owl.carousel.min.js');
	
	wp_enqueue_script('mixitup', get_template_directory_uri() . '/assets/js/jquery.mixitup.min.js');
	
	wp_enqueue_script('plyr-min', get_template_directory_uri() . '/assets/js/plyr.min.js', array('jquery'), false, true);
	
	wp_enqueue_script('intro', get_template_directory_uri() . '/assets/js/intro.js', array('jquery'), false, true);
	
	wp_enqueue_script('jquery-ripples', get_template_directory_uri() . '/assets/js/jquery.ripples.min.js', array('jquery'),false, true);
	
	wp_enqueue_script('wow-min', get_template_directory_uri() . '/assets/js/wow.min.js', array('jquery'), false, true);
	
	wp_enqueue_script('magnific-popup-js', get_template_directory_uri() . '/assets/js/magnific-popup.js', array('jquery'), false, true);

	wp_enqueue_script('news25-custom', get_template_directory_uri() . '/assets/js/custom.js', array('jquery'), false, true);
	
	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
		wp_enqueue_script( 'comment-reply' );
	}
}
add_action( 'wp_enqueue_scripts', 'news25_scripts' );

//Admin Enqueue for Admin
function news25_admin_enqueue_scripts(){
	wp_enqueue_style('news25-admin-style', get_template_directory_uri() . '/assets/css/admin.css');
	wp_enqueue_script( 'news25-admin-script', get_template_directory_uri() . '/assets/js/news25-admin-script.js', array( 'jquery' ), '', true );
    wp_localize_script( 'news25-admin-script', 'news25_ajax_object',
        array( 'ajax_url' => admin_url( 'admin-ajax.php' ) )
    );
}
add_action( 'admin_enqueue_scripts', 'news25_admin_enqueue_scripts' );