learndash_get_wrapper_class( int|WP_Post|null $post = null, string $additional_classes = '' )
Returns the Learndash content wrapper CSS class.
Description #
Filterable function to add a class to all LearnDash content, allows conditional adding of additional classes.
// TODO: Add tests for this function.
Parameters #
- $post
-
(int|WP_Post|null) (Optional)
WP_Postobject or post ID. Default to global $post.Default value: null
- $additional_classes
-
(string) (Optional) Additional classes to add to the wrapper.
Default value: ''
Return #
(string) Wrapper CSS class.
Source #
File: themes/helpers.php
Changelog #
| Version | Description |
|---|---|
| 4.6.0 | Added the optional $additional_classes parameter. |
| 4.21.0 | Ensured $additional_classes gets added to the returned value and added a new Post Type-specific wrapper class for LearnDash Content Types. |
| 3.0.0 | Introduced. |