public function update( $args, $assoc_args ) {

		// Shuffle the position of these.
		$args[1] = $args[0];
		$terms   = get_the_terms( $args[1], 'nav_menu' );
		if ( $terms && ! is_wp_error( $terms ) ) {
			$args[0] = (int) $terms[0]->term_id;
		} else {
			$args[0] = 0;
		}
		$type = get_post_meta( $args[1], '_menu_item_type', true );
		$this->add_or_update_item( 'update', $type, $args, $assoc_args );

	}
public function update( $args, $assoc_args ) {

		// Shuffle the position of these.
		$args[1] = $args[0];
		$terms   = get_the_terms( $args[1], 'nav_menu' );
		if ( $terms && ! is_wp_error( $terms ) ) {
			$args[0] = (int) $terms[0]->term_id;
		} else {
			$args[0] = 0;
		}
		$type = get_post_meta( $args[1], '_menu_item_type', true );
		$this->add_or_update_item( 'update', $type, $args, $assoc_args );

	}
public function update ( $ args , $ assoc_args ) { // Shuffle the position of these. $ args [ 1 ] = $ args [ 0 ] ; $ terms = get_the_terms ( $ args [ 1 ] , 'nav_menu' ) ; if ( $ terms && ! is_wp_error ( $ terms ) ) { $ args [ 0 ] = ( int ) $ terms [ 0 ] -> term_id ; } else { $ args [ 0 ] = 0 ; } $ type = get_post_meta ( $ args [ 1 ] , '_menu_item_type' , true ) ; $ this -> add_or_update_item ( 'update' , $ type , $ args , $ assoc_args ) ; }
Updates a menu item.

## OPTIONS

<db-id>
: Database ID for the menu item.

[--title=<title>]
: Set a custom title for the menu item.

[--link=<link>]
: Set a custom url for the menu item.

[--description=<description>]
: Set a custom description for the menu item.

[--attr-title=<attr-title>]
: Set a custom title attribute for the menu item.

[--target=<target>]
: Set a custom link target for the menu item.

[--classes=<classes>]
: Set a custom link classes for the menu item.

[--position=<position>]
: Specify the position of this menu item.

[--parent-id=<parent-id>]
: Make this menu item a child of another menu item.

## EXAMPLES

$ wp menu item update 45 --title=WordPress --link='http://wordpress.org' --target=_blank --position=2
Success: Menu item updated.

@subcommand update
Updates a menu item .