<?php 
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

function netto_admin_css() {
	wp_enqueue_style( 'theme-default-font-admin', netto_slug_fonts_url(), array(), null );
	wp_enqueue_style( 'netto-admin', NETTO_THEME_URL . '/assets/css/admin.css', array(), NETTO_THEME_VERSION );	
	$documentation_link = apply_filters('netto_documentation_link', true);

    if ($documentation_link) {
		wp_enqueue_script( 'admin-theme-js', NETTO_THEME_URL . '/assets/js/admin.js', array( 'jquery' ), NETTO_THEME_VERSION, true );    
    }
}

// Hook the custom_admin_css function to the admin_enqueue_scripts action.
add_action('admin_enqueue_scripts', 'netto_admin_css', 11);

add_action('admin_menu', 'netto_custom_appearance_submenu');

function netto_custom_appearance_submenu() {
	
    $documentation_link = apply_filters('netto_documentation_link', true);

    if (!$documentation_link) {
        return;
    }
	
    add_submenu_page(
        'themes.php', 
        __( 'Documentation', 'netto' ), 
        __( 'Documentation', 'netto' ), 
        'manage_options', 
        'custom_documentation_link', 
        '__return_null' 
    );
}