PluginProbe
QuadMenu – Mega Menu / 3.3.3
QuadMenu – Mega Menu v3.3.3
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 / lib / panel / class-options.php

class-options.php in QuadMenu – Mega Menu 3.3.3, at lib/panel/class-options.php

49 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace QuadLayers\QuadMenu\Panel;
4
5 use QuadLayers\QuadMenu\Panel;
6
7 if ( ! defined( 'ABSPATH' ) ) {
8 die( '-1' );
9 }
10
11 class Options extends Panel {
12
13 private static $instance;
14
15 function __construct() {
16 add_action( 'redux/' . QUADMENU_DB_OPTIONS . '/panel/before', array( $this, 'header' ) );
17 add_filter( 'quadmenu_redux_args', array( $this, 'args' ), -10 );
18 }
19
20 function args( $args ) {
21
22 $args['menu_type'] = 'submenu';
23 $args['page_parent'] = self::$panel_slug;
24 $args['page_slug'] = QUADMENU_PANEL;
25 $args['allow_sub_menu'] = true;
26 $args['page'] = $args['display_name'] = $args['menu_title'] = esc_html__( 'Options', 'quadmenu' );
27
28 if ( ! is_admin() ) {
29 $args['page'] = $args['display_name'] = $args['menu_title'] = QUADMENU_PLUGIN_NAME;
30 }
31
32 return $args;
33 }
34
35 function header() {
36
37 global $submenu;
38
39 require_once QUADMENU_PLUGIN_DIR . 'lib/panel/pages/parts/header.php';
40 }
41
42 public static function instance() {
43 if ( ! isset( self::$instance ) ) {
44 self::$instance = new self();
45 }
46 return self::$instance;
47 }
48 }
49