Skip to content

Instantly share code, notes, and snippets.

@actual-saurabh
Created March 16, 2018 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save actual-saurabh/0b2bd5c30f4d047f05198e3cf447b477 to your computer and use it in GitHub Desktop.
Save actual-saurabh/0b2bd5c30f4d047f05198e3cf447b477 to your computer and use it in GitHub Desktop.
Filtering LifterLMS's default difficulty levels
<?php // Do not copy this line into functions.php
// copy from under this line
function _my_llms_custom_default_difficulties() {
return array(
'Gold',
'Silver',
'Bronze',
'Any other name',
'and so on within quotes and followed by a comma',
);
}
add_filter( 'llms_install_create_difficulties', '_my_llms_prevent_default_difficulties' );
<?php // Do not copy this line into functions.php
// copy from under this line
function _my_llms_prevent_default_difficulties( $difficulties ) {
return array();
}
add_filter( 'llms_install_create_difficulties', '_my_llms_prevent_default_difficulties' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment