<?php
/**
 * Modern Bakery Shop functions
 */

if ( ! function_exists( 'modern_bakery_shop_setup' ) ) :
function modern_bakery_shop_setup() {
    load_theme_textdomain( 'modern-bakery-shop', get_template_directory() . '/languages' );
}
endif; 
add_action( 'after_setup_theme', 'modern_bakery_shop_setup' );

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

if ( ! function_exists( 'modern_bakery_shop_styles' ) ) :
	function modern_bakery_shop_styles() {
		// Register theme stylesheet.
		wp_register_style('modern-bakery-shop-style',
			get_template_directory_uri() . '/style.css',array(),
			wp_get_theme()->get( 'Version' )
		);
		
		wp_enqueue_style( 
			'fontawesome-style', 
			get_template_directory_uri() .'/assets/fontawesome/css/all.css' 
		);

		wp_enqueue_script('modern-bakery-shop-js',
        	get_template_directory_uri() . '/assets/js/effects.js',array(),
        	wp_get_theme()->get('Version'),true 
   		);

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

		wp_enqueue_script( 'scroll-to-top-js',
			get_template_directory_uri() . '/assets/js/scroll-to-top.js',
			array(),
			wp_get_theme()->get('Version'),
			true
		);

		// Enqueue theme stylesheet.
		wp_enqueue_style( 'modern-bakery-shop-style' );

		wp_style_add_data( 'modern-bakery-shop-style', 'rtl', 'replace' );

	}
endif;
add_action( 'wp_enqueue_scripts', 'modern_bakery_shop_styles' );