<?php
/**
 *  Saryu functions and definitions
 *
 * @package Saryu
 * @since 	 1.0.0
 */


if ( ! function_exists( 'saryu_setup' ) ) :

	function saryu_setup() {

		// Add default posts and comments RSS feed links to head.
		add_theme_support( 'automatic-feed-links' );

		// Add support for editor styles.
		add_theme_support( 'editor-styles' );

		// Add support for block styles.
		add_theme_support( 'wp-block-styles' );
		add_theme_support( 'align-wide' ); 
		add_theme_support('responsive-embeds');

		// Enqueue editor styles.
		add_editor_style( '/inc/admin/editor-style.css' );

		// Post Thumbnails
		add_theme_support( 'post-thumbnails' );
		set_post_thumbnail_size( 840,600, true );

		// Add custom image sizes
		add_image_size('saryu_thumbnail',840,600, true );

		//  Customize Title Tag
		add_theme_support( 'title-tag' );
		

	}

endif;

add_action( 'after_setup_theme', 'saryu_setup' );

if ( ! function_exists( 'saryu_styles' ) ) :

	function saryu_styles() {
		// Register theme stylesheet.
		$theme_version = wp_get_theme()->get( 'Version' );

		$version_string = is_string( $theme_version ) ? $theme_version : false;
		wp_enqueue_style('saryu-assets-style', get_template_directory_uri() . '/assets/css/style.css',array(),$version_string);
		wp_enqueue_style('saryu-custom-style', get_template_directory_uri() . '/inc/css/custom-style.css', array(),$version_string);
		wp_enqueue_style('saryu-style', get_template_directory_uri() . '/style.css',array(),$version_string);
	}

endif;

add_action( 'wp_enqueue_scripts', 'saryu_styles' );

/*----------------------------------------------------------
*Dashicons
*----------------------------------------------------------*/
if ( ! function_exists( 'saryu_load_dashicons' ) ) :
function saryu_load_dashicons() {
	wp_enqueue_style('dashicons');
}
endif;
add_action( 'wp_print_styles', 'saryu_load_dashicons');

/*----------------------------------------------------------
*Add Block Styles
*----------------------------------------------------------*/
require get_template_directory() . '/inc/block-styles.php';
/*----------------------------------------------------------
*Add block patterns
*----------------------------------------------------------*/
require get_template_directory() . '/inc/block-patterns.php';