-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoowcode-custom-menu-shortcode.php
More file actions
74 lines (63 loc) · 2.66 KB
/
oowcode-custom-menu-shortcode.php
File metadata and controls
74 lines (63 loc) · 2.66 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/**
* Plugin Name: OOW Custom Menu Shortcode
* Plugin URI: https://profiles.wordpress.org/oowpress/
* Description: A lightweight, flexible tool to display and customize menus using a shortcode. Supports inline and list styles, custom separators, nested menus, real-time preview, predefined themes, and integration with Gutenberg, Elementor, Divi, and WPBakery—no coding required.
* Version: 1.7
* Author: oowpress
* Author URI: https://oowcode.com
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: oowcode-custom-menu-shortcode
* Domain Path: /languages
*
* @package OOW_Custom_Menu_Shortcode
* @since 1.0
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
}
/**
* Define Plugin Version Constant
*
* Retrieves the plugin version from the file header and defines it as a constant.
*
* @since 1.0
*/
define('OOW_CUSTOM_MENU_SHORTCODE_VERSION', get_file_data(__FILE__, array('Version' => 'Version'))['Version']);
define('OOW_CUSTOM_MENU_SHORTCODE_NAME', get_file_data(__FILE__, array('PluginName' => 'Plugin Name'))['PluginName']);
define('OOW_CUSTOM_MENU_SHORTCODE_SLUG', 'oow-pjax/oow-pjax.php');
define('OOW_CUSTOM_MENU_SHORTCODE_PAGE_URL', 'https://oowcode.com/oow-pjax');
define('OOW_CUSTOM_MENU_SHORTCODE_DIR', plugin_dir_path(__FILE__));
define('OOW_CUSTOM_MENU_SHORTCODE_URL', plugin_dir_url(__FILE__));
/**
* Include Core Classes
*
* Loads the main shortcode, extensions, Gutenberg block, Elementor widget, Divi module, and WPBakery shortcode classes conditionally.
*
* @since 1.0
*/
if (!class_exists('OOW_Extensions')) {
require_once plugin_dir_path(__FILE__) . 'includes/class-oow-extensions.php';
}
require_once plugin_dir_path(__FILE__) . 'includes/class-oow-custom-menu-shortcode.php';
// Charger le bloc Gutenberg si l'éditeur de blocs est disponible
if (function_exists('register_block_type')) {
require_once plugin_dir_path(__FILE__) . 'includes/blocks/oow-custom-menu-block.php';
}
// Charger le widget Elementor si Elementor est actif
if (did_action('elementor/loaded')) {
require_once plugin_dir_path(__FILE__) . 'includes/elementor/class-oow-elementor-widget.php';
}
// Charger le module Divi si Divi est actif
if (defined('ET_BUILDER_VERSION')) {
require_once plugin_dir_path(__FILE__) . 'includes/divi/class-oow-divi-module.php';
}
// Charger le composant WPBakery si WPBakery est actif
if (defined('WPB_VC_VERSION')) {
require_once plugin_dir_path(__FILE__) . 'includes/wpbakery/class-oow-wpbakery-shortcode.php';
}
// Instantiate OOW_Extensions using singleton
OOW_Extensions::get_instance();
// Instantiate OOW_Custom_Menu_Shortcode
new OOW_Custom_Menu_Shortcode();