OE_PATH .'includes/menu-icons/', 'url' => OE_URL .'includes/menu-icons/', 'types' => array(), ); // Load Icon Picker. if ( ! class_exists( 'OE_Icon_Selector' ) ) { $ip_file = self::$data['dir'] . 'includes/library/icon-selector/icon-selector.php'; if ( file_exists( $ip_file ) ) { require_once $ip_file; } else { add_action( 'admin_notices', array( __CLASS__, '_notice_missing_icon_picker' ) ); return; } } OE_Icon_Selector::instance(); require_once self::$data['dir'] . 'includes/library/compat.php'; require_once self::$data['dir'] . 'includes/library/functions.php'; require_once self::$data['dir'] . 'includes/meta.php'; OE_Menu_Icons_Meta::init(); add_action( 'oe_icon_picker_init', array( __CLASS__, '_init' ), 9 ); } /** * Initialize * * 1. Get registered types from Icon Picker * 2. Load settings * 3. Load front-end functionalities * */ public static function _init() { /** * Allow themes/plugins to add/remove icon types * */ self::$data['types'] = apply_filters( 'oe_menu_icons_types', OE_Icon_Picker_Types_Registry::instance()->types ); // Nothing to do if there are no icon types registered. if ( empty( self::$data['types'] ) ) { if ( WP_DEBUG ) { trigger_error( esc_html__( 'Menu Icons: No registered icon types found.', 'ocean-extra' ) ); } return; } // Load settings. require_once self::$data['dir'] . 'includes/settings.php'; OE_Menu_Icons_Settings::init(); // Load front-end functionalities. if ( ! is_admin() ) { require_once self::$data['dir'] . '/includes/front.php'; OE_Menu_Icons_Front_End::init(); } do_action( 'oe_menu_icons_loaded' ); } /** * Display notice about missing Icon Picker * */ public static function _notice_missing_icon_picker() { ?>