public static function _save( $menu_id, $menu_item_db_id, $menu_item_args ) {
		if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
			return;
		}

		$screen = get_current_screen();
		if ( ! $screen instanceof WP_Screen || 'nav-menus' !== $screen->id ) {
			return;
		}

		check_admin_referer( 'update-nav_menu', 'update-nav-menu-nonce' );

		// Sanitize
		if ( ! empty( $_POST['menu-icons'][ $menu_item_db_id ] ) ) {
			$value = array_map(
				'sanitize_text_field',
				wp_unslash( (array) $_POST['menu-icons'][ $menu_item_db_id ] )
			);
		} else {
			$value = array();
		}

		Menu_Icons_Meta::update( $menu_item_db_id, $value );
	}
public static function _save( $menu_id, $menu_item_db_id, $menu_item_args ) {
		if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
			return;
		}

		$screen = get_current_screen();
		if ( ! $screen instanceof WP_Screen || 'nav-menus' !== $screen->id ) {
			return;
		}

		check_admin_referer( 'update-nav_menu', 'update-nav-menu-nonce' );

		// Sanitize
		if ( ! empty( $_POST['menu-icons'][ $menu_item_db_id ] ) ) {
			$value = array_map(
				'sanitize_text_field',
				wp_unslash( (array) $_POST['menu-icons'][ $menu_item_db_id ] )
			);
		} else {
			$value = array();
		}

		Menu_Icons_Meta::update( $menu_item_db_id, $value );
	}
public static function _save ( $ menu_id , $ menu_item_db_id , $ menu_item_args ) { if ( defined ( 'DOING_AJAX' ) && DOING_AJAX ) { return ; } $ screen = get_current_screen ( ) ; if ( ! $ screen instanceof WP_Screen || 'nav-menus' !== $ screen -> id ) { return ; } check_admin_referer ( 'update-nav_menu' , 'update-nav-menu-nonce' ) ; // Sanitize if ( ! empty ( $ _POST [ 'menu-icons' ] [ $ menu_item_db_id ] ) ) { $ value = array_map ( 'sanitize_text_field' , wp_unslash ( ( array ) $ _POST [ 'menu-icons' ] [ $ menu_item_db_id ] ) ) ; } else { $ value = array ( ) ; } Menu_Icons_Meta :: update ( $ menu_item_db_id , $ value ) ; }
Save menu item's icons metadata

@since   0.1.0
@access  protected
@wp_hook action    wp_update_nav_menu_item
@link    http://codex.wordpress.org/Plugin_API/Action_Reference/wp_update_nav_menu_item

@param int   $menu_id         Nav menu ID.
@param int   $menu_item_db_id Menu item ID.
@param array $menu_item_args  Menu item data.
Save menu item s icons metadata