<?php
/*
* Plugin-Name: Product Designer App
* Plugin-URI: https://productdesignerapp.com
* Author: productdesignerapp
* Backend requies
*/

if (!defined('ABSPATH'))
{
    exit;
}

if(!class_exists('PDAPP_Requies'))
{
	class PDAPP_Requies
	{
		public function __construct()
		{
			add_action('admin_menu', array(&$this, 'pdapp_add_requires_menu'));
		}

		public function pdapp_add_requires_menu()
		{
			add_menu_page(
				"PDA",
				"PDA",
				PDAPP_CAP_ACCESS,
				PDAPP_PLUGIN_SLUG,
				array($this, 'pdapp_requires'),
				PDAPP_PLUGIN_URL .'admin/assets/images/logo-menu.png'
			);

			add_submenu_page(
				PDAPP_PLUGIN_SLUG,
				"Requies",
				"Requies",
				PDAPP_CAP_ACCESS,
				PDAPP_PLUGIN_SLUG,
				array($this, 'pdapp_requires')
			);

			wp_enqueue_style('pdapp-menu-style', PDAPP_PLUGIN_URL . 'admin/assets/css/pdapp-menu.css', array(), PDAPP_VERSION, 'all');
		}
		
		public function pdapp_requires()
		{
			require PDAPP_ADMIN_PLUGIN_DIR .'pages/requires/index.php';
		}
	}
}

new PDAPP_Requies();
?>