Created
June 23, 2021 09:11
-
-
Save shubham-99fusion/02125d94bd6baa44387f7ac20be37d20 to your computer and use it in GitHub Desktop.
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
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