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 | |
namespace uncanny_learndash_toolkit; | |
/** | |
* Class Boot | |
* | |
* @package uncanny_learndash_toolkit | |
*/ | |
class Boot extends Config { |
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 below this line | |
/** | |
* Generates sequential serial numbers for a given post type | |
*/ | |
class LLMS_Serial_Number_Generator { | |
private $post_type = ''; |
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 | |
// hide system access plans from pricing table and course/membership editor | |
add_filter( 'llms_get_product_access_plans_args', 'llms_custom_hide_system_access_plans_args' ); | |
function llms_custom_hide_system_access_plans_args ( $args, $product, $free_only, $visible_only ) { | |
if( isset( $args['tax_query'] ) ) { | |
$args['tax_query'][0]['terms'][] = 'system'; |
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_certificate_grade_merge_code', 10, 2 ); | |
function llms_certificate_grade_merge_code( $merge_codes_array, $certificate_object ) { | |
// add custom certificate title merge code to existing ones. See https://github.com/gocodebox/lifterlms/blob/a1a6833c6e6bab57bf4356739463220e51f89408/includes/certificates/class.llms.certificate.user.php#L132 |
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 | |
/** | |
* Award a certificate engagement attached to a unit (course, quiz, etc) to a user | |
* @param int $user_id The ID of the user to award the certificate to. | |
* @param int $engagement_id The post ID of the engagement | |
* @param int $trigger_id The post ID of the trigger post (course, lesson, quiz, etc) | |
*/ | |
function llms_award_certificate( $user_id, $engagement_id, $trigger_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( 'lifterlms_get_person_fields', 'llms_change_form_cols', 10, 1 ); | |
function llms_change_form_cols( $fields ) { | |
foreach ( $fields as $field ) { | |
if ( $field['id'] === 'llms_billing_city' ){ |
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 | |
/* | |
* Any links to restricted pages added to emails should contain a redirection parameter. | |
* When user lands on a restricted screen with a redirection parameter, | |
* they are redirected to the login screen (with the usual notice). | |
* On loggin in, the user is redirected back to the restricted page. | |
*/ | |
add_action( 'lifterlms_content_restricted', 'llms_maybe_email_unit_redirect', 10, 1); |
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
body.llms-is-focused .content-area { | |
background: #fff none; | |
padding:0; | |
overflow-y:scroll; | |
position:fixed; | |
width:100%; | |
height:100%; | |
top:0; | |
left:0; | |
bottom:0; |
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_prefix_suffix_merge_codes', 10, 2 ); | |
function llms_custom_certificate_title_merge_code( $merge_codes_array, $certificate_object ){ | |
// add custom certificate title merge code to existing ones. See https://github.com/gocodebox/lifterlms/blob/a1a6833c6e6bab57bf4356739463220e51f89408/includes/certificates/class.llms.certificate.user.php#L132 | |
$merge_codes_array['{merge-code-1}'] = get_user_meta( $certificate_object->user_id, 'custom_field_key_1', true ); |
NewerOlder