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
This commit is contained in:
parent
f3d83c3f6c
commit
6d5084ef1c
@ -4338,13 +4338,14 @@ function get_ancestors( $object_id = 0, $object_type = '', $resource_type = '' )
|
||||
* Filter a given object's ancestors.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @since 4.1.0 Introduced the `$resource_type` parameter.
|
||||
*
|
||||
* @param array $ancestors An array of object ancestors.
|
||||
* @param int $object_id Object ID.
|
||||
* @param string $object_type Type of object.
|
||||
* @param string $resource_type Type of resource $object_type is.
|
||||
*/
|
||||
return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type );
|
||||
return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user