PluginProbe
QuadMenu – Mega Menu / 3.3.4
QuadMenu – Mega Menu v3.3.4
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 / class-icons.php

class-icons.php in QuadMenu – Mega Menu 3.3.4, at lib/class-icons.php

47 lines 1.0 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;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 die( '-1' );
7 }
8
9 use QuadLayers\QuadMenu\Redux_Legacy;
10
11 /**
12 * Icons Class ex QuadMenu_Icons
13 */
14 class Icons extends Redux_Legacy {
15
16 private static $instance;
17
18 public $args = array();
19 public $sections = array();
20 public $theme;
21 public $ReduxFramework;
22
23 public function __construct() {
24
25 add_action( 'redux/options/' . QUADMENU_DB_OPTIONS . '/settings/change', array( $this, 'icons' ), 10, 2 );
26 }
27
28 static function icons( $options = false, $changed = false ) {
29
30 // if settings change, take new values from redux update
31 if ( empty( $changed['styles_icons'] ) ) {
32 return;
33 }
34
35 Redux_Legacy::do_reload( true );
36
37 Redux_Legacy::add_notification( 'blue', sprintf( esc_html__( 'Theme icons have been changed. Your options panel will be reloaded. %s.', 'quadmenu' ), esc_html__( 'Please wait', 'quadmenu' ) ) );
38 }
39
40 public static function instance() {
41 if ( ! isset( self::$instance ) ) {
42 self::$instance = new self();
43 }
44 return self::$instance;
45 }
46 }
47