# quadmenu/2.0.1/includes/functions.php

QuadMenu – Mega Menu, version 2.0.1. 81 lines.

- Page: https://pluginprobe.com/plugins/quadmenu/2.0.1/code/includes/functions.php
- Raw: https://pluginprobe.com/plugins/quadmenu/2.0.1/raw/includes/functions.php
- Modified: 2018-11-10T15:50:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/quadmenu/2.0.1/code/includes/functions.php#L10-L20`.

```php
<?php

if (!defined('ABSPATH')) {
  die('-1');
}

if (!function_exists('is_quadmenu')) {

  function is_quadmenu($menu_id = false) {
    return QuadMenu::instance()->is_quadmenu($menu_id);
  }

}

if (!function_exists('quadmenu_get_menu_theme')) {

  function quadmenu_get_menu_theme($location = null, $menu_id = null) {

    global $quadmenu_themes, $quadmenu_active_locations;

    $theme = '';

    if (isset($quadmenu_active_locations[$location])) {
      $theme = $quadmenu_active_locations[$location];
    }

    if ($theme && isset($quadmenu_themes[$theme])) {
      return $theme;
    }

    if (is_array($quadmenu_themes)) {
      return current(array_keys($quadmenu_themes));
    }

    return 'default_theme';
  }

}

// Developers
// -----------------------------------------------------------------------------

if (!function_exists('quadmenu_compiler_enqueue')) {

  function quadmenu_compiler_enqueue() {

    $screen = get_current_screen();

    if (isset($screen->base) && !strpos($screen->base, QUADMENU_PANEL) === false)
      return;

    QuadMenu_Compiler::instance()->enqueue();
  }

}

if (!function_exists('quadmenu_compiler_integration')) {

  function quadmenu_compiler_integration() {
    add_action('admin_init', 'quadmenu_compiler_enqueue', 26);
  }

}

if (!function_exists('quadmenu_do_compiler')) {

  function quadmenu_do_compiler() {
    QuadMenu_Compiler::instance()->do_compiler(true);
  }

}

if (!function_exists('quadmenu_compiler_variables')) {

  function quadmenu_compiler_variables() {
    return QuadMenu_Compiler::instance()->redux_compiler();
  }

}


```
