learndash_get_label

apply_filters( 'learndash_get_label',  string $label,  string $key )

Filters the value of label settings entered in the settings page. Used to filter label value in get_label function.


Description #


Parameters #

$label

(string) Label entered on settings page.

$key

(string) Key name of setting field.


Source #

File: includes/class-ld-custom-label.php


Examples #

 <?php
/**
 * Example usage for learndash_get_label filter.
 */
add_filter(
	'learndash_get_label',
	function( $label, $key ) {
		// May add any custom logic using $label, $key.

		// Always return $label.
		return $label;
	},
	10,
	2
);