403Webshell
Server IP : 103.48.194.25  /  Your IP : 216.73.217.33
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33
System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64
User : sieuthimay ( 1016)
PHP Version : 8.2.20
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/sieuthimayasia.com/public_html/wp-content/themes/mtw-maycn/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/sieuthimayasia.com/public_html/wp-content/themes/mtw-maycn/inc/menu.php
<?php
/**
 * MTW menu utils classes.
 *
 * @package MTWTeam
 */

/**
 * MTW Menu Support Class
 */
class MTW_Menu_Support {
	/**
	 * Conditionally hook into WordPress.
	 */
	public static function init() {
		add_action( 'ncnfw_init', array( __CLASS__, 'register_fields' ) );
		add_filter( 'nav_menu_item_args', array( __CLASS__, 'support_menu_icon' ), 20, 3 );
	}

	/**
	 * Register menu fields.
	 *
	 * @param MTWFW $ncnfw MTWFW Instance Class.
	 */
	public static function register_fields( $ncnfw ) {
		$ncnfw->register_menu_field( '_menu_item_mtwfn_icon', array(
			'type'  => 'icon',
			'title' => esc_html__( 'Menu Icon', 'maycn' ),
		) );
	}

	/**
	 * Menu icon support.
	 *
	 * @param array  $args  An array of arguments.
	 * @param object $item  Menu item data object.
	 * @param int    $depth Depth of menu item. Used for padding.
	 */
	public static function support_menu_icon( $args, $item, $depth ) {
		$args = wp_clone( $args );

		if ( $icon = get_post_meta( $item->ID, '_menu_item_mtwfn_icon', true ) ) {
			$args->link_before = ' <span class="menu-icon"><i class="'. esc_attr( $icon ) .'"></i></span> ';
		}

		return $args;
	}

	/**
	 * Helper fallback menu.
	 */
	public static function fallback() {
		$fallback_menu = '<div class="primary-menu-container col-md-8"><ul id="primary-menu" class="menu clearfix"><li class="current-menu-item"><a href="%1$s" rel="home">%2$s</a></li></ul></div>';
		printf( $fallback_menu, esc_url( home_url( '/' ) ), esc_html__( 'Home', 'maycn' ) ); // WPCS: XSS OK.
	}

	/**
	 * Helper fallback mobile menu.
	 */
	public static function mobile_fallback() {
		$fallback_menu = '<div class="mobile-menu-container"><div class="close-menu">' . esc_html__( 'Đóng menu x', 'maycn' ) . '</div><ul id="moblie-menu" class="moblie-menu"><li class="current-menu-item"><a href="%1$s" rel="home">%2$s</a></li></ul></div>';
		printf( $fallback_menu, esc_url( home_url( '/' ) ), esc_html__( 'Home', 'maycn' ) ); // WPCS: XSS OK.
	}
}

MTW_Menu_Support::init();

Youez - 2016 - github.com/yon3zu
LinuXploit