This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_filter( 'llms_certificate_merge_codes', 'llms_custom_certificate_title_merge_code', 10, 2 ); | |
function llms_custom_certificate_title_merge_code( $merge_codes_array, $certificate_object ){ | |
// add custom certificate title merge code to existing ones | |
$merge_codes_array['{certificate_title}'] = $certificate_object->title; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_filter( 'llms_certificate_merge_codes', 'llms_custom_course_title_merge_code', 10, 2 ); | |
function llms_custom_course_title_merge_code( $merge_codes_array, $certificate_object ){ | |
// the triger post's (course's) id is in the lesson_id property of the $certificate_object | |
$course_title = get_the_title( $certificate_object->lesson_id ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_action( 'template_redirect', 'llms_redirect_logged_in_on_login_shortcode' ); | |
function llms_redirect_logged_in_on_login_shortcode(){ | |
// don't do anything if a user is not logged in | |
if( ! is_user_logged_in() ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_action( 'llms_user_enrolled_in_course', 'llms_enroll_in_welcome_course', 10, 2 ); | |
// Uncomment to enroll when user joins a membership | |
add_action( 'llms_user_added_to_membership_level', 'llms_enroll_in_welcome_course', 10, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_filter( 'lifterlms_get_person_fields', 'llms_hide_fields_for_free_plans', 10, 2 ); | |
function llms_hide_fields_for_free_plans( $fields, $screen ){ | |
// bail if it isn't the checkout screen | |
if ( $screen != 'checkout' ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_action( 'lifterlms_course_completed', 'llms_enroll_in_restrictive_membership', 10, 2 ); | |
function llms_completed_welcome_course( $student_id, $course_id ){ | |
/* | |
* the welcome course's id. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_filter( 'llms_membership_restricted_post_types', 'my_membership_restriction_post_types' ); | |
/** | |
* Add LifterLMS membership restrictions to a custom post type | |
* @param array $post_types array of custom post types | |
* @return array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "llms/welcome-course-membership", | |
"title": "Welcome Course Membership", | |
"version": "1.0.0", | |
"description": "Automatically enroll new members of a membership into a welcome course.", | |
"homepage": "https://lifterlms.com", | |
"author": "saurabhshukla", | |
"tags": [ "onboarding", "membership", "course" ], | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This can override the LifterLMS Class | |
* However, then we'll have to hook this one before loading LifterLMS itself | |
* This file can be included by LifterLMS by filtering the autoloader | |
* Include Override: lifterlms/includes/forms/controllers/class.llms.controller.login.php | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "package", | |
"version": "package", | |
"description": "package", | |
"homepage": "https://lifterlms.com", | |
"author": "lifterlms", | |
"tags": [ ], | |
"gist": "https://gist.github.com/actual-saurabh/3ce88c1b1465224eeab16e884d5916ec", | |
"title": "gist", |