<?php
define('DRAGBLOCK_ADMIN_MENU_SLUG', 'dragblockAdminMenu'); // 18 char

// register the plugin page
add_action('admin_menu', 'dragblock_admin_main_menu', 1);
function dragblock_admin_main_menu()
{
	if (!empty($GLOBALS['admin_page_hooks'][DRAGBLOCK_ADMIN_MENU_SLUG])) {
		return;
	}

	add_menu_page(
		esc_attr__('DragBlock Welcome Page', 'dragblock'),
		esc_attr__('DragBlock', 'dragblock'),
		'manage_options',
		DRAGBLOCK_ADMIN_MENU_SLUG,
		'dragblock_admin_main_menu_page',
		DRAGBLOCK_URL . 'assets/images/brands/favicon-20x20.png',
		6
	);
}

// define the main menu page callback function
function dragblock_admin_main_menu_page()
{
	// Redirect users to the form entry page
	// // display the content of the default plugin page
	echo wp_kses_post('<h1>' . esc_html__('Welcome to DragBlock', 'dragblock') . '</h1>');
	echo wp_kses_post('<p>' . esc_html__('If you have any suggestion, please send to', 'dragblock') . ' <a href="mailto:contact@dragblock.com"><strong>contact@dragblock.com</strong></a>. ' . esc_html__('Thank you very much.', 'dragblock') . '</p>');

	
}

/*
add_action('admin_enqueue_scripts', 'dragblock_admin_enqueue_scripts');
function dragblock_admin_enqueue_scripts()
{
	dragblock_enqueue('dragblock-app-admin', 'build/applications/admin-menu/index.js', array('jquery'));
	dragblock_enqueue('dragblock-app-admin', 'build/applications/admin-menu/style-index.css');
}
*/
