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

if (!defined('BEE_CORP_VERSION')) {
    // Replace the version number of the theme on each release.
    define('BEE_CORP_VERSION', '1.0.1');
}

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

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

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

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

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

/**
 * Register pattern categories.
 */

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

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

add_action( 'init', 'bee_corp_pattern_categories' );

/**
 * Calling in the admin area for the Welcome Page as well as for the new theme notice too.
 */
if (is_admin()) {
    require get_template_directory() . '/inc/dashboard/class-admin.php';
    require get_template_directory() . '/inc/dashboard/class-dashboard.php';
    require get_template_directory() . '/inc/dashboard/welcome-notice.php';
}

require get_template_directory() . '/inc/dashboard/changelog.php';
require_once get_theme_file_path( '/inc/customizer.php' );