wphooks.info - post_class

post_class

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/post-template.php:
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
	/**
	 * Filters the list of CSS class names for the current post.
	 *
	 * @since 2.7.0
	 *
	 * @param string[] $classes An array of post class names.
	 * @param string[] $class   An array of additional class names added to the post.
	 * @param int      $post_id The post ID.
	 */
	$classes = apply_filters( 'post_class', $classes, $class, $post->ID );

	return array_unique( $classes );
}

/**
 * Displays the class names for the body element.
 *
 * @since 2.8.0
 *