Browse: Home / Hooks /

learndash_lesson_row_atts_sample_no_access

apply_filters( 'learndash_lesson_row_atts_sample_no_access',  string $attribute,  int $lesson_id,  int $course_id,  int $user_id )

Filters lesson row attributes if the access to sample lesson is not allowed to a user.


Description #


Parameters #

$attribute

(string) Lesson row attribute. The attribute value to show if the sample lesson is not accessible.

$lesson_id

(int) Lesson ID.

$course_id

(int) Course ID.

$user_id

(int) User ID.


Source #

File: themes/ld30/templates/lesson/partials/row.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for learndash_lesson_row_atts_sample_no_access filter.
 */
add_filter(
	'learndash_lesson_row_atts_sample_no_access',
	function( $attribute, $lesson_id, $course_id, $user_id ) {
		// May add any custom logic using $attribute.

		// Always return $attribute.
		return $attribute;
	},
	10,
	4
);
 

Changelog #

Changelog
Version Description
3.1.4 Introduced.