From 1ae565455b6a05c991c4b13335ddd34b480a154f Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sun, 27 Sep 2015 02:17:25 +0000 Subject: [PATCH] Pass the post ID to the `get_the_categories` filter. Props SergeyBiryukov. See #9227. Built from https://develop.svn.wordpress.org/trunk@34624 git-svn-id: http://core.svn.wordpress.org/trunk@34588 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index f57e3d291e..019854d127 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -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 ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 1f84df4c9d..4870ab0868 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34623'; +$wp_version = '4.4-alpha-34624'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.