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_course_purchased',function($label,$course_id){ | |
| $page = vibebp_get_setting('bp_single_page'); | |
| if(function_exists('icl_object_id')){ | |
| $single_page = icl_object_id($single_page, 'page', true); | |
| } | |
| if(!empty($page)){ | |
| return '<li> | |
| <a class="course_name">'.get_post_field('post_title',$course_id).'</a> | |
| <a href="'.get_permalink($page).'#component=courses&action='.$course_id.'" class="button"> | |
| '.__('START COURSE','vibe').'</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
    
  
  
    
  | class WPLMS_Course_GRoup_Customisation | |
| { | |
| public static $instance; | |
| private $bypass = false; | |
| public static function init(){ | |
| if ( is_null( self::$instance ) ) | |
| self::$instance = new WPLMS_Course_GRoup_Customisation(); | 
  
    
      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_dynamic_quiz_tag_questions',function($args,$alltags,$quiz_id,$user_id){ | |
| //fetch result | |
| $user_quiz_result = bp_course_get_quiz_results_meta($quiz_id,$user_id); | |
| if(empty($user_quiz_result)){ | |
| return $args; | |
| } | |
| if(is_serialized($user_quiz_result)){ | |
| $user_quiz_result = unserialize($user_quiz_result); | |
| } | 
  
    
      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
    
  
  
    
  | class Drip_Expired_Check{ | |
| public static $instance; | |
| public $time_to_adjust = 0; | |
| public static function init(){ | |
| if ( is_null( self::$instance ) ) | |
| self::$instance = new Drip_Expired_Check(); | |
| return self::$instance; | |
| } | 
  
    
      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('template_redirect',function(){ | |
| global $post; | |
| if(is_page(vibebp_get_setting('bp_single_page'))){ | |
| $wpml_page_id = apply_filters('wplm_object_id',$post_id,'page'); | |
| if($post->ID != $wpml_page_id){ | |
| $new_url = str_replace(get_permalink($post->ID),get_permalink($wpml_page_id),$_SERVER['REQUEST_URI']); | |
| wp_redirect($new_url); | |
| 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
    
  
  
    
  | <?php | |
| add_action( 'widgets_init', 'Sample_Widget' ); | |
| function Sample_Widget() { | |
| register_widget('Sample_Widget'); | |
| } | |
| class Sample_Widget extends WP_Widget { | |
  
    
      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(){ | |
| ?> | |
| <script>var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>'; </script> | |
| <?php | |
| }); | 
  
    
      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_head',function(){ | |
| if(is_page_template('barebones.php')){ | |
| ?> | |
| <meta http-equiv="origin-trial" content="DIGITAL GOODS API V2 TOKEN"> | |
| <?php | |
| } | |
| }); | 
  
    
      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_shortcode('my_courses',function($atts,$content=null){ | |
| if(empty($atts['user_id'])){ | |
| $user_id = get_current_user_id(); | |
| }else{ | |
| $user_id = $atts['user_id']; | |
| } | |
| $course_ids = bp_course_get_user_courses($user_id); | |
NewerOlder