From 0c2e698a04f2e122ffe007d72cf0cb08a5468280 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Thu, 8 Jan 2015 06:10:23 +0000 Subject: [PATCH] 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. Merges [30993] to 4.1 branch Props tmatsuur, DrewAPicture. Fixes #30843. Built from https://develop.svn.wordpress.org/branches/4.1@31084 git-svn-id: http://core.svn.wordpress.org/branches/4.1@31065 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 1d93f69047..099d236618 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -4336,13 +4336,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 ); } /**