mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user