From 7eea49d9d141d3432025fdc6d889436c27a5ceb7 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 27 Feb 2010 17:49:49 +0000 Subject: [PATCH] Pass post ID to post_class filter, even when calling post_class() without parameters in the loop. fixes #11878 git-svn-id: https://develop.svn.wordpress.org/trunk@13462 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 6ff765f6f0..7df0dd0bd7 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -344,7 +344,7 @@ function get_post_class( $class = '', $post_id = null ) { $classes = array_map('esc_attr', $classes); - return apply_filters('post_class', $classes, $class, $post_id); + return apply_filters('post_class', $classes, $class, $post->ID); } /**