Added optional url for get_next_url().