public static function get_menu_object($theme_location)
    {
        $locations = \get_nav_menu_locations();

        if (isset($locations[ $theme_location ])) {
            return \wp_get_nav_menu_object($locations[ $theme_location ]);
        }

        return false;
    }
public static function get_menu_object($theme_location)
    {
        $locations = \get_nav_menu_locations();

        if (isset($locations[ $theme_location ])) {
            return \wp_get_nav_menu_object($locations[ $theme_location ]);
        }

        return false;
    }
public static function get_menu_object ( $ theme_location ) { $ locations = \ get_nav_menu_locations ( ) ; if ( isset ( $ locations [ $ theme_location ] ) ) { return \ wp_get_nav_menu_object ( $ locations [ $ theme_location ] ) ; } return false ; }
Returns a menu object for a given theme location.

@since 1.0.0

@param  string $theme_location Menu name.
@return \WP_Term|false Menu Object on success, false on failure.
Returns a menu object for a given theme location .