Browse: Home / Hooks /

learndash_get_content_label

apply_filters( '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


Source #

File: themes/ld30/includes/helpers.php


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 #

Changelog
Version Description
3.0.0 Introduced.