public function remove( $args, $assoc_args ) {

		list( $menu, $location ) = $args;

		$menu = wp_get_nav_menu_object( $menu );
		if ( ! $menu || is_wp_error( $menu ) ) {
			WP_CLI::error( 'Invalid menu.' );
		}

		$locations = get_nav_menu_locations();
		if ( Utils\get_flag_value( $locations, $location ) !== $menu->term_id ) {
			WP_CLI::error( "Menu isn't assigned to location." );
		}

		$locations[ $location ] = 0;
		set_theme_mod( 'nav_menu_locations', $locations );

		WP_CLI::success( 'Removed location from menu.' );

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

		list( $menu, $location ) = $args;

		$menu = wp_get_nav_menu_object( $menu );
		if ( ! $menu || is_wp_error( $menu ) ) {
			WP_CLI::error( 'Invalid menu.' );
		}

		$locations = get_nav_menu_locations();
		if ( Utils\get_flag_value( $locations, $location ) !== $menu->term_id ) {
			WP_CLI::error( "Menu isn't assigned to location." );
		}

		$locations[ $location ] = 0;
		set_theme_mod( 'nav_menu_locations', $locations );

		WP_CLI::success( 'Removed location from menu.' );

	}
public function remove ( $ args , $ assoc_args ) { list ( $ menu , $ location ) = $ args ; $ menu = wp_get_nav_menu_object ( $ menu ) ; if ( ! $ menu || is_wp_error ( $ menu ) ) { WP_CLI :: error ( 'Invalid menu.' ) ; } $ locations = get_nav_menu_locations ( ) ; if ( Utils \ get_flag_value ( $ locations , $ location ) !== $ menu -> term_id ) { WP_CLI :: error ( "Menu isn't assigned to location." ) ; } $ locations [ $ location ] = 0 ; set_theme_mod ( 'nav_menu_locations' , $ locations ) ; WP_CLI :: success ( 'Removed location from menu.' ) ; }
Removes a location from a menu.

## OPTIONS

<menu>
: The name, slug, or term ID for the menu.

<location>
: Location's slug.

## EXAMPLES

$ wp menu location remove primary-menu primary
Success: Removed location from menu.

@subcommand remove
Removes a location from a menu .