<?php


// Freemius Code Starts Here
if ( ! function_exists( 'gb_fs' ) ) {
    // Create a helper function for easy SDK access.
    function gb_fs() {
        global $gb_fs;

        if ( ! isset( $gb_fs ) ) {
            // Include Freemius SDK.
            require_once dirname( __FILE__ ) . '/freemius/start.php';

            $gb_fs = fs_dynamic_init( array(
                'id'                  => '13180',
                'slug'                => 'glossy-blog',
                'type'                => 'theme',
                'public_key'          => 'pk_9e7557ebda29a60ed6e60d730a09c',
                'is_premium'          => false,
                // If your theme is a serviceware, set this option to false.
                'has_premium_version' => true,
                'has_addons'          => false,
                'has_paid_plans'      => true,
                // Automatically removed in the free version. If you're not using the
                // auto-generated free version, delete this line before uploading to wp.org.
            ) );
        }

        return $gb_fs;
    }

    // Init Freemius.
    gb_fs();
    // Signal that SDK was initiated.
    do_action( 'gb_fs_loaded' );
}
// Freemius Code Ends Here



function glossy_enqueue_styles() {
    // Enqueue the main stylesheet
    wp_enqueue_style('glossy-style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'glossy_enqueue_styles');

function glossy_enqueue_editor_styles() {
    // Enqueue the main stylesheet and editor-specific stylesheet for the block editor
    wp_enqueue_style('glossy-style', get_stylesheet_uri());
}
add_action( 'enqueue_block_assets', function () {
	wp_enqueue_style( 'glossy-style', get_stylesheet_uri() );
} );






require_once get_template_directory() . '/inc/theme-info.php';


/**
 * Admin menu highlight (global).
 */
add_action( 'admin_enqueue_scripts', function () {
	$css = '
		#menu-appearance li:last-child a{
			background:#1a7f37 !important;
			color:#fff !important;
		}
		#menu-appearance li:last-child a .wp-menu-name,
		#menu-appearance li:last-child a .wp-menu-image:before{
			color:#fff !important;
		}
	';
	wp_register_style( 'glossy_blog-admin', false );
	wp_enqueue_style( 'glossy_blog-admin' );
	wp_add_inline_style( 'glossy_blog-admin', $css );
} );
