</div> <div class="col-md-3"> <div class="widget pricing"> <?php the_course_button(); ?> <?php the_course_details(); ?> </div> <div class="students_undertaking"> <?php $students_undertaking = array(); $students_undertaking = bp_course_get_students_undertaking(); $students = get_post_meta(get_the_ID(), 'vibe_students', true); echo '<strong>' . $students . __(' STUDENTS ENROLLED', 'vibe') . '</strong>'; echo '<ul>'; $i = 0; foreach ($students_undertaking as $student) { $i++; echo '<li>' . get_avatar($student) . '</li>'; if ($i > 10) { break; } } echo '</ul>'; ?> </div> <?php $sidebar = apply_filters('wplms_sidebar', 'coursesidebar', get_the_ID());
function bp_course_item_view() { $filter = apply_filters('bp_course_single_item_view', 0); if ($filter) { return; } $course_classes = apply_filters('bp_course_single_item', 'course_single_item', get_the_ID()); ?> <li class="<?php echo $course_classes; ?> "> <div class="row"> <div class="col-md-4 col-sm-4"> <div class="item-avatar" data-id="<?php echo get_the_ID(); ?> "> <?php bp_course_avatar(); ?> </div> </div> <div class="col-md-8 col-sm-8"> <div class="item"> <div class="item-title"><?php bp_course_title(); if (get_post_status() != 'publish') { echo '<i> ( ' . get_post_status() . ' ) </i>'; } ?> </div> <div class="item-meta"><?php bp_course_meta(); ?> </div> <div class="item-desc"><?php bp_course_desc(); ?> </div> <div class="item-credits"> <?php if (bp_is_my_profile()) { the_course_button(get_the_ID()); } else { bp_course_credits(); } ?> </div> <div class="item-instructor"> <?php bp_course_instructor(); ?> </div> <div class="item-action"><?php bp_course_action(); ?> </div> <?php do_action('bp_directory_course_item'); ?> </div> </div> </div> </li> <?php }
<div class="item"> <div class="item-title"><?php bp_course_title(); ?> </div> <div class="item-meta"><?php bp_course_meta(); ?> </div> <div class="item-desc"><?php bp_course_desc(); ?> </div> <div class="item-credits"> <?php the_course_button(get_the_ID()); ?> </div> <div class="item-instructor"> <?php bp_course_instructor(); ?> </div> <div class="item-action"><?php bp_course_action(); ?> </div> <?php do_action('bp_directory_course_item'); ?>
function vibe_course_button($atts, $content = null) { extract(shortcode_atts(array('id' => ''), $atts)); $return = ''; if (!empty($id)) { ob_start(); the_course_button($id); $return = ob_get_clean(); } return $return; }