<?php
/**
 * Party Corp functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package Party Corp
 * @since Party Corp 1.0
 */

if ( ! function_exists( 'party_corp_support' ) ) :
    /**
     * Sets up theme defaults and registers support for various WordPress features.
     *
     * @since 1.0.0
     *
     * @return void
     */

    function party_corp_support() {
        add_editor_style( get_stylesheet_directory_uri().'/assets/css/editor.css' );
    }

endif;
add_action( 'after_setup_theme', 'party_corp_support' );

function party_corp_styles() {
	wp_enqueue_style(
		'party-corp-style',
		get_stylesheet_uri(),
		[],
		wp_get_theme()->get( 'Version' )
	);

	wp_enqueue_style( 'dashicons' );
}
add_action( 'wp_enqueue_scripts', 'party_corp_styles' );

/**
 * Register pattern categories.
 */

if ( ! function_exists( 'party_corp_pattern_categories' ) ) :
	/**
	 * Register pattern categories
	 *
	 * @since Party Corp 1.0
	 * @return void
	 */
	function party_corp_pattern_categories() {

		register_block_pattern_category(
			'party-corp',
			array(
				'label'       => __( 'Party Corp', 'party-corp' ),
				'description' => __( 'A collection of full theme pattern.', 'party-corp' ),
			)
		);
	}
endif;

add_action( 'init', 'party_corp_pattern_categories' );