This hook has been deprecated.
apply_filters_deprecated( 'learndash_get_content_label', string $label, string $post_type )
Filters label for the content type by post type. Used to override label settings set by the user.
Description #
Parameters #
- $label
-
(string) Label for the content type.
- $post_type
-
(string) Post type.
Return #
(string) Label for the content type.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_get_content_label filter.
*/
add_filter(
'learndash_get_content_label',
function( $label, $post_type ) {
// May add any custom logic using $label, $post_type.
// Always return $label.
return $label;
},
10,
2
);
Changelog #
| Version | Description |
|---|---|
| 5.0.0 | This hook has been deprecated. |
| 3.0.0 | Introduced. This hook has been deprecated. |