apply_filters( 'learndash_body_classes', array $custom_classes, string|false $post_type, int|false $post_id )
Filters list of body tag CSS classes.
Description #
Parameters #
- $custom_classes
-
(array) Body css classes.
- $post_type
-
(string|false) Post Type slug.
- $post_id
-
(int|false) Post ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?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 );