From 5e730a0cf9c07c8b98c978cb85ff3dbec4e0ab73 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 13 Nov 2014 02:24:43 +0000 Subject: [PATCH] Pass query object to 'the_post' filter. Props tlovett1. Fixes #30327. git-svn-id: https://develop.svn.wordpress.org/trunk@30323 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/query.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php index 033db0cf05..559ce807d4 100644 --- a/src/wp-includes/query.php +++ b/src/wp-includes/query.php @@ -4590,10 +4590,12 @@ class WP_Query { * Fires once the post data has been setup. * * @since 2.8.0 + * @since 4.1.0 Introduced $this parameter. * - * @param WP_Post &$post The Post object (passed by reference). + * @param WP_Post &$post The Post object (passed by reference). + * @param WP_Query &$this The current Query object (passed by reference). */ - do_action_ref_array( 'the_post', array( &$post ) ); + do_action_ref_array( 'the_post', array( &$post, &$this ) ); return true; }