This file contains hidden or 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_action('wplms_batches_extras',function($batch_id){ | |
$enable_seats = groups_get_groupmeta($batch_id,'enable_seats'); | |
if(!empty($enable_seats)){ | |
$count = groups_get_total_member_count($batch_id); | |
$batch_seats = groups_get_groupmeta($batch_id,'batch_seats'); | |
if($count >= $batch_seats){ | |
echo '<a href="URL_TO_CONTACT_PAGE" class="full">'.__('Waiting','wplms-batches').'</a>'; | |
} | |
} | |
This file contains hidden or 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('vibe_option_custom_sections',function($sections){ | |
$sections[1]['fields'][]= array( | |
'id' => 'header_notification', | |
'type' => 'editor', | |
'title' => __('Header Notification', 'vibe'), | |
'sub_desc' => __('* Standard headers', 'vibe'), | |
'desc' => __('Add header notification', 'vibe'), | |
'std' => '' | |
); | |
return $sections; |
This file contains hidden or 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('bp_course_api_get_user_course_status_item',function($return,$request){ | |
$course_id = $request['course']; | |
$user_id = pmpro_get_user_from_token($request); | |
if(!empty($course_id) && !empty($user_id)){ | |
$course_membership_ids = get_post_meta( $course_id, 'vibe_pmpro_membership', true ); | |
if(!empty($course_membership_ids) && is_array($course_membership_ids)){ | |
if(!pmpro_hasMembershipLevel($course_membership_ids,$user_id)){ | |
$return = array( | |
'status' => 0, | |
'message' => 'Not access' |
This file contains hidden or 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
Notice [6th May] : InAppBrowser version should be 3.2.0 and Ios Cordova version 5.1.1 | |
/*==== | |
Ionic: | |
Ionic CLI : 5.4.4 | |
Utility: |
This file contains hidden or 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_action('wp_footer',function(){ | |
if(!is_page(vibe_get_option('create_course'))){ | |
return; | |
} | |
?> | |
<script> | |
jQuery(document).ready(function($){ | |
var word_limit = 200; | |
$('#course_curriculum').on('active',function(){ |
This file contains hidden or 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_get_instructor_course_count',function($count,$user_id){ | |
$args = array( | |
'posts_per_page' => -1, | |
'post_type' => 'course', | |
'post_author'=>$user_id, | |
'suppress_filters' => false | |
); | |
$result = new WP_Query($args); | |
return $result->post_count; |
This file contains hidden or 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_action('wplms_course_admin_form',function($students,$course_id){ | |
$batch_ids = wplms_get_course_batches($course_id); | |
echo ' <select id="wplms_user_batch"><option value="">'.__('Filter by Batch','vibe').'</option>'; | |
foreach($batch_ids as $batch_id){ | |
echo '<option value="'.$batch_id.'">'.wplms_get_batch_link($batch_id).'</option>'; | |
} | |
echo '</select>'; |
This file contains hidden or 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
<?php | |
if ( !defined( 'ABSPATH' ) ) exit; | |
$redirect_course_cat_directory = vibe_get_option('redirect_course_cat_directory'); | |
if(!empty($redirect_course_cat_directory)){ | |
locate_template( array( 'course/index.php' ), true ); | |
exit; | |
} |
This file contains hidden or 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('bp_course_single_item_view',function($flag,$post){ | |
$course_post_id = $post->ID; | |
$course_author= $post->post_author; | |
$course_classes = apply_filters('bp_course_single_item','course_single_item course_id_'.$post->ID.' course_status_'.$post->post_status.' course_author_'.$post->post_author,get_the_ID()); | |
?> |
This file contains hidden or 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_action('bp_get_course_check_course_complete',function($course_id,$user_id){ | |
add_filter('bp_course_get_course_curriculum',function($curriculum,$course_id){ | |
global $wpdb; | |
$quiz_ids = $wpdb->get_var($wpdb->prepare("SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key ='vibe_quiz_course' AND meta_value = %d",$course_id)); | |
if(!empty($quiz_ids)){ | |
foreach($quiz_ids as $quiz_id){ | |
if(array_search($quiz_id, $curriculum) === false){ | |
$curriculum[]=$quiz_id; | |
} |