Repository navigation
Expand file tree
/
Copy pathdev3-ai-mega-menu.php
More file actions
50 lines (45 loc) · 1.69 KB
/
Copy pathdev3-ai-mega-menu.php
File metadata and controls
50 lines (45 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* Plugin Name: DEV3 AI Mega Menu for WordPress
* Plugin URI: https://dev3.tech/item/dev3-ai-mega-menu
* Description: AI-assisted mega menus: panels, columns, tabs, mobile accordion and off-canvas menus, built and audited with DEV3 AI.
* Version: 1.0.0
* Requires at least: 6.0
* Requires PHP: 7.4
* Author: DEV3 Technologies
* Author URI: https://dev3.tech
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: dev3-ai-mega-menu
* Domain Path: /languages
*
* @package Dev3\AiMegaMenu
*/
defined( 'ABSPATH' ) || exit;
define( 'DEV3MM_VERSION', '1.0.0' );
define( 'DEV3MM_FILE', __FILE__ );
define( 'DEV3MM_PATH', plugin_dir_path( __FILE__ ) );
define( 'DEV3MM_URL', plugin_dir_url( __FILE__ ) );
define( 'DEV3MM_SLUG', 'dev3-ai-mega-menu' );
define( 'DEV3MM_NAME', 'DEV3 AI Mega Menu for WordPress' );
define( 'DEV3MM_MIN_PHP', '7.4' );
define( 'DEV3MM_MIN_WP', '6.0' );
define( 'DEV3MM_DB_VERSION', '1.0.0' );
if ( version_compare( PHP_VERSION, DEV3MM_MIN_PHP, '<' ) ) {
return;
}
spl_autoload_register(
static function ( $class_name ) {
$prefix = 'Dev3\AiMegaMenu\\';
if ( 0 !== strpos( $class_name, $prefix ) ) {
return;
}
$file = DEV3MM_PATH . 'includes/' . str_replace( '\\', '/', substr( $class_name, strlen( $prefix ) ) ) . '.php';
if ( is_readable( $file ) ) {
require_once $file;
}
}
);
register_activation_hook( __FILE__, array( '\Dev3\AiMegaMenu\Plugin', 'activate' ) );
register_deactivation_hook( __FILE__, array( '\Dev3\AiMegaMenu\Plugin', 'deactivate' ) );
add_action( 'plugins_loaded', array( '\Dev3\AiMegaMenu\Plugin', 'instance' ) );