Pass the post ID to the get_the_categories filter.

Props SergeyBiryukov.
See #9227.

git-svn-id: https://develop.svn.wordpress.org/trunk@34624 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2015-09-27 02:16:23 +00:00
parent 307c3ca81f
commit c39a4a6447

View File

@ -91,10 +91,12 @@ function get_the_category( $id = false ) {
* Filter the array of categories to return for a post.
*
* @since 3.1.0
* @since 4.4.0 Added `$id` parameter.
*
* @param array $categories An array of categories to return for the post.
* @param int $id ID of the post.
*/
return apply_filters( 'get_the_categories', $categories );
return apply_filters( 'get_the_categories', $categories, $id );
}
/**