PluginProbe
QuadMenu – Mega Menu / 1.8.9
QuadMenu – Mega Menu v1.8.9
3.3.7 3.3.6 trunk 1.8.4 1.8.5 1.8.7 1.8.8 1.8.9 1.9.0 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 All 87 releases
quadmenu / includes / functions.php

functions.php in QuadMenu – Mega Menu 1.8.9, at includes/functions.php

81 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) {
4 die('-1');
5 }
6
7 if (!function_exists('is_quadmenu')) {
8
9 function is_quadmenu($menu_id = false) {
10 return QuadMenu::instance()->is_quadmenu($menu_id);
11 }
12
13 }
14
15 if (!function_exists('quadmenu_get_menu_theme')) {
16
17 function quadmenu_get_menu_theme($location = null, $menu_id = null) {
18
19 global $quadmenu_themes, $quadmenu_active_locations;
20
21 $theme = '';
22
23 if (isset($quadmenu_active_locations[$location])) {
24 $theme = $quadmenu_active_locations[$location];
25 }
26
27 if ($theme && isset($quadmenu_themes[$theme])) {
28 return $theme;
29 }
30
31 if (is_array($quadmenu_themes)) {
32 return current(array_keys($quadmenu_themes));
33 }
34
35 return 'default_theme';
36 }
37
38 }
39
40 // Developers
41 // -----------------------------------------------------------------------------
42
43 if (!function_exists('quadmenu_compiler_enqueue')) {
44
45 function quadmenu_compiler_enqueue() {
46
47 $screen = get_current_screen();
48
49 if (isset($screen->base) && !strpos($screen->base, QUADMENU_PANEL) === false)
50 return;
51
52 QuadMenu_Compiler::instance()->enqueue();
53 }
54
55 }
56
57 if (!function_exists('quadmenu_compiler_integration')) {
58
59 function quadmenu_compiler_integration() {
60 add_action('admin_init', 'quadmenu_compiler_enqueue', 26);
61 }
62
63 }
64
65 if (!function_exists('quadmenu_do_compiler')) {
66
67 function quadmenu_do_compiler() {
68 QuadMenu_Compiler::instance()->do_compiler(true);
69 }
70
71 }
72
73 if (!function_exists('quadmenu_compiler_variables')) {
74
75 function quadmenu_compiler_variables() {
76 return QuadMenu_Compiler::instance()->redux_compiler();
77 }
78
79 }
80
81