LLMS_Integration_BBPress::handle_course_forum_restriction( array $restriction )
Handle course forum restrictions
Description Description
Add a notice and redirect to the course
Parameters Parameters
- $restriction
-
(array) (Required) Restriction Results from
llms_page_restricted()
.
Return Return
(void)
Source Source
File: includes/integrations/class.llms.integration.bbpress.php
public function handle_course_forum_restriction( $restriction ) { /** * Customize the restriction notice message displayed when a forum is restricted to a course. * * @since 3.37.11 * * @param string $msg Default message. * @param array $restriction Results from `llms_page_restricted()`. */ $msg = apply_filters( 'llms_bbp_course_forum_restriction_msg', __( 'You must be enrolled in this course to access the course forum.', 'lifterlms' ), $restriction ); llms_add_notice( $msg, 'error' ); llms_redirect_and_exit( get_permalink( $restriction['restriction_id'] ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.37.11 | Use llms_redirect_and_exit() in favor of wp_redirect() . |
3.13.0 | Unknown. |
3.12.0 | Introduced. |