apply_filters( 'learndash_lesson_sample_access', boolean $access, integer $post_id, integer $user_id )

Filters whether to allow access to the sample lesson or not.


Description Description

By default a sample lesson is available even to anonymous users. This filter will override that access. The filer ‘learndash_can_access_sample’ is also used themes/ld30/templates/lesson/partials/row.php to control visibility of the lesson and sub-steps.


Parameters Parameters

$access

Access status true if the user can access $post_id.

$post_id

Course step the user is trying to access.

$user_id

User ID.


Top ↑

Source Source

File: themes/ld30/includes/helpers.php


Top ↑

Changelog Changelog

Changelog
Version Description
3.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.