Created
November 3, 2018 01:30
-
-
Save MrVibe/091a9e02c17bf557b80a644ac6400ebd to your computer and use it in GitHub Desktop.
WPLMS Show Course online/offline status in Course details
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_details_array',function($details){ | |
$details['unit_duration'] = array( | |
'label'=>_x('Course Offline/Online Status','label in details array','vibe-customtypes'), | |
'callback'=> 'custom_get_course_offline_online_status', | |
); | |
return $details; | |
}); | |
function custom_get_course_offline_online_status(){ | |
$offline = get_post_meta(get_the_ID(),'vibe_course_offline',true); | |
return '<li>'._x("Type","Course Detail Sidebar Average Rating","vibe-customtypes").'<i class="course_detail_span">'.(($offline === 'S')?'Offline':'Online').'</i></li>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment