Skip to content

Instantly share code, notes, and snippets.

@shubham-99fusion
Created June 23, 2021 09:11
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 shubham-99fusion/02125d94bd6baa44387f7ac20be37d20 to your computer and use it in GitHub Desktop.
Save shubham-99fusion/02125d94bd6baa44387f7ac20be37d20 to your computer and use it in GitHub Desktop.
add_filter('wplms_course_creation_tabs',function($tabs){
$curriculum_elements = $tabs['course_curriculum']['fields'][0]['curriculum_elements'];
foreach ($curriculum_elements as $key => $curriculum_element) {
if($curriculum_element['type'] == 'assignment'){
foreach ($curriculum_element['types'] as $key1 => $type) {
if($type['id'] == 'textarea'){
$curriculum_element['types'][$key1]['icon'] = 'vicon vicon-text'; //your icon ti will be replace by vicon from https://themify.me/themify-icons
}elseif($type['id'] == 'upload'){
unset($curriculum_element['types'][$key1]);
}
}
$curriculum_elements[$key] = $curriculum_element;
}
}
$tabs['course_curriculum']['fields'][0]['curriculum_elements'] = $curriculum_elements;
return $tabs;
},10,1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment