How do I hide unit duration

Home Forums Legacy Support Support queries Styling issues How do I hide unit duration

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #374187
    danibuu
    Participant
    Hey guys, How do I hide unit duration?
    #374188
    danibuu
    Participant
    This reply has been marked as private.
    #374281
    Anshuman Sahu
    Keymaster
    please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
    add_filter('wplms_course_creation_tabs',function($tabs, $course_id=null, $user_id=null){
    /* check if user can manage options or not */
        
        $curriculum_elements = $tabs['course_curriculum']['fields'][0]['curriculum_elements'];
        foreach ($curriculum_elements as $key => $curriculum_element) {
           /*hide unit tag */
            if($curriculum_element['type'] == 'unit'){
                foreach ($curriculum_element['types'] as $key1 => $unit_type) { 
                    $ffs = [];
                    foreach ($curriculum_element['types'][$key1]['fields'] as $key2 => $field) {
                        if($field['id']!='vibe_duration'){
                            $ffs[]=$field;
                        }
                    }
                    $curriculum_element['types'][$key1]['fields'] = $ffs;
                }
            }
           
            $curriculum_elements[$key] = $curriculum_element;       
            
        }
        $tabs['course_curriculum']['fields'][0]['curriculum_elements'] = $curriculum_elements;
        
        return $tabs;
    },10,3);
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How do I hide unit duration’ is closed to new replies.