Pass `$resource_type` to 'get_ancestors' filter.

The `$resource_type` argument was added to the `get_ancestors()` function in
[30141]. In that changeset, the documentation for the filter was updated to
indicate that it would receive `$resource_type` as a param, but the filter
itself was not updated accordingly.

Props tmatsuur, DrewAPicture.
Fixes #30843.

git-svn-id: https://develop.svn.wordpress.org/trunk@30993 602fd350-edb4-49c9-b593-d223f7449a82