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 // 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 // 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 ); |
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
.llms-syllabus-wrapper .llms-section-title { | |
cursor: pointer; | |
} | |
.llms-syllabus-wrapper .llms-section-title::after { | |
content: "\25b6"; | |
float: left; | |
display: inline-block; | |
width: 15px; | |
text-align: left; | |
margin-right: 15px; |
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 // don't copy this line to your functions.php file | |
/** | |
* | |
* Create Company Industry as a custom field upon registration or checkout | |
* | |
* @param $fields - fields already being registered | |
* @param $screen - either checkout or registration screen | |
* @return $fields - array with added field | |
*/ | |
function add_company_industry_lifterlms ( $fields , $screen ) { |
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 | |
/** | |
* 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_action( 'init', 'llms_turn_off_notifications', 10, 999 ); | |
add_action( 'wp_enqueue_scripts', 'llms_dequeue_notification_script', 10, 999 ); | |
if ( ! function_exists( 'llms_turn_off_notifications' ) ){ | |
function llms_turn_off_notifications(){ |
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' ){ |
NewerOlder