Skip to content

Instantly share code, notes, and snippets.

View shubham-99fusion's full-sized avatar

shubham-99fusion

View GitHub Profile
{
"rules":{
".read":"auth != null",
".write":"auth != null",
"notifications":{
".indexOn":[
"status"
]
},
"users":{
@shubham-99fusion
shubham-99fusion / bugs.txt
Last active July 14, 2020 12:38
4.0 bugs
#####
1- setup wizard 4.0 on wp-admin page se: https://prnt.sc/thjijp
2- localforage undefined : https://prnt.sc/thjxep https://prnt.sc/thjwwy
this.translations = {
'home_title': 'HOME PAGE',
'home_subtitle': 'Featured Items',
'start_course': 'Start',
'search_title': 'Searching..',
'continue_course': 'Continue',
'completed_course': 'Completed',
'expired_course': 'Expired',
'evaluation_course': 'Under Evaluation',
'no_reviews': 'No reviews found for this course.',
<?php
/**
* Initialise WPLMS Batches
*
* @class Wplms_Batches_Init
* @author VibeThemes
* @category Admin
* @package WPLMS-Batches/includes
* @version 1.0
*/
@shubham-99fusion
shubham-99fusion / vibe-zoom configure in wplms app
Last active August 12, 2020 07:30
read this for vibe-zoom configuration in app
It will open the zoom in in-app browser you can select you prefered browser too.
Necessary part : Please make sure make backup of your app src folder and vibe-course-module plugin.
Download files from here: https://drive.google.com/drive/folders/1Py5DOoQNXF9IdnRTGTAxPjbISH2FPe95?usp=sharing
vibe-zoom plugin : https://drive.google.com/drive/folders/1mVI4mmNiJAEdhDF_WlnEc-ldTyPh4mdn?usp=sharing
Important : Also make sure set unit type video refer this: https://prnt.sc/td966h
@shubham-99fusion
shubham-99fusion / class-api-user-controller.php
Created June 27, 2020 11:22
vibe-zoom class-api-user-controller.php
<?php
/*
Dear ThimPress, please be original and this time do not copy our code !
*/
defined( 'ABSPATH' ) or die();
if ( ! class_exists( 'BP_Course_Rest_Course_Controller' ) ) {
add_filter('wplms_direct_access_tounit','enable_access_tostudents',999,2);
function enable_access_tostudents($flag,$post){ if(!empty($_GET) && !empty($_GET['access_token'])){
$token = urldecode ($_GET['access_token']);
$course_id = $_GET['id']; global $wpdb;
$user_id = $wpdb->get_var(“SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = '$token'”); if(!empty($user_id) && is_numeric($user_id)){ $check = wplms_user_course_active_check($user_id,$course_id);
if($check){
return 0;
}
} }
return $flag;
/*
USER REGISTRATION
*/
function register_user($request){
$post = json_decode(file_get_contents('php://input'));
$enable = bp_course_get_setting( 'api_registrations', 'api','boolean' );
if(empty($enable )){
$user_register_flag = false;
$message = _x('Registrations disabled in API','registration disabled in api','vibe');
@shubham-99fusion
shubham-99fusion / gist:25e8cce57f989a56efcbca0a2f78f96a
Created February 27, 2020 13:44
customizer code for No. of free course create instructor
// for no. of course create instructor
add_filter('premium_course_publish_check',function($can_publish,$user_id,$total_courses,$published_course){
$pubCourse = apply_filters('premium_coures_pubCourse',2); // no. of free course create currently 2
if($published_course<$pubCourse){
return true;
}
return false;
},10,4);
<?php
/**
* Initialise WPLMS Instructor Premium Courses
*
* @class Wplms_Premium_Courses_Filters
* @author Vibethemes(H.K. Latiyan)
* @category Admin
* @package WPLMS-Woocommerce/includes/instructor_premium_course
* @version 1.0
*/