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 | |
$triggers = array( | |
'achievement_earned', | |
'certificate_earned', | |
'course_complete', | |
'course_track_complete', | |
'enrollment', | |
'lesson_complete', | |
'manual_payment_due', |
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. | |
/** | |
* This will prevent old lessons and lessons created with the course builder to have blocks added. | |
*/ | |
add_filter( | |
'llms_blocks_should_migrate_post', | |
function( $ret, $post_id ) { | |
return $post_id && 'lesson' === get_post_type( $post_id ) ? false : $ret; | |
}, |
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 // dont copy this to your functios.php file | |
/** | |
* Change the maximum number of access plans which can be created for a single course / membership | |
* | |
* @param int $cols The number of columns of the pricing table for the `$product`. | |
* @return int | |
*/ | |
function my_llms_get_product_pricing_table_columns_count( $cols ) { | |
// Always organize pricing table in rows of 3 colums, when plans are more than 6. |
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 | |
add_filter( | |
'lifterlms_get_person_fields', | |
function ( $fields, $screen ) { | |
if ( 'account' === $screen ) { | |
foreach ( $fields as &$field ) { | |
if ( in_array( $field['id'], array( 'first_name', 'last_name' ), true ) ) { | |
$field['disabled'] = 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
.single-llms_my_certificate .elementor-location-header, | |
.single-llms_certificate .elementor-location-header { | |
display: none; | |
} |
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 | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', 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
<?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 //<- don' copy this whole line! | |
// Copy from under this line and paste into your child theme's functions.php or in the LifterLMS Customization plugin | |
add_filter( 'register_post_type_args', 'my_llms_show_quiz_questions_ui', 10, 2 ); | |
function my_llms_show_quiz_questions_ui( $args, $post_type ) { | |
if ( in_array( $post_type, array( 'llms_quiz', 'llms_question' ) ) ) { | |
$args['show_ui'] = true; | |
} | |
return $args; | |
} |
NewerOlder