HEX
Server: LiteSpeed
System: Linux sg-cp4.cloudnetwork.vn 4.18.0-553.69.1.lve.el8.x86_64 #1 SMP Wed Aug 13 19:53:59 UTC 2025 x86_64
User: thu28850 (1134)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/thu28850/public_html/wp-content/themes/martfury/inc/mega-menu/class-mega-menu.php
<?php

class Martfury_Mega_Menu {
	/**
	 * Martfury_Mega_Menu constructor.
	 */
	public function __construct() {

		$this->load();
		$this->init();

		add_filter( 'wp_edit_nav_menu_walker', array( $this, 'edit_nav_menu_walker' ) );
	}

	/**
	 * Load files
	 */
	private function load() {
		include get_template_directory() . '/inc/mega-menu/class-menu-edit.php';
	}

	/**
	 * Initialize
	 */
	private function init() {
		if ( is_admin() ) {
			new Martfury_Mega_Menu_Edit();
		}
	}

	/**
	 * Change the default nav menu walker
	 *
	 * @return string
	 */
	public function edit_nav_menu_walker() {
		return 'Martfury_Mega_Menu_Walker_Edit';
	}
}

add_action( 'init', 'martfury_mega_menu_init' );
function martfury_mega_menu_init() {
	global $martfury_mega_menu;

	$martfury_mega_menu = new Martfury_Mega_Menu();

}