learndash_body_classes

apply_filters( 'learndash_body_classes',  string $custom_classes,  string|false $post_type,  int|false $post_id )

Filters list of body tag CSS classes.


Description #


Parameters #

$custom_classes

(string) Body css classes.

$post_type

(string|false) Post Type slug.

$post_id

(int|false) Post ID.


Source #

File: includes/ld-misc-functions.php


Examples #

 <?php
/**
 * Example usage for learndash_body_classes filter.
 */
add_filter(
	'learndash_body_classes',
	function( $custom_classes, $post_type, $post_id ) {
		// May add any custom logic using $custom_classes, $post_type, $post_id.

		// Always return $custom_classes.
		return $custom_classes;
	},
	10,
	3
);