Moved a bunch of menu parsing to wp-utilities/api.