Skip to content

Instantly share code, notes, and snippets.

View shubham-99fusion's full-sized avatar

shubham-99fusion

View GitHub Profile
add_filter('bp_course_api_get_course_terms','remove_blank_cats',10,2);
function remove_blank_cats($categories, $request){
foreach($categories as $category) {
if($category->count >0) { $newcategories[]=$category; }
} return $newcategories;
add_filter('bp_course_api_get_user_course_status_item',function ($return, $request){
if(!class_exists('Wplms_Bbb'))
return $return;
global $wpdb;
$user_token = $request->get_header('authorization');
$user_id = $wpdb->get_var("SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = '$user_token'");
$version = bp_course_get_setting( 'app_version', 'api','number' );
if(!is_numeric($user_id)){
return $return;
}
@shubham-99fusion
shubham-99fusion / translation.txt
Last active January 22, 2019 22:00
translation
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.',
jQuery(document).ready(function($){
$('.wplms_clp_step_read_more').on('click',function(event){
event.preventDefault();
var $this = $(this);
if( $this.hasClass('active') ){
$this.removeClass('active');
$this.parent().find('.wplms_clp_step_read').addClass('hide');
$this.parent().find('.wplms_clp_step_initial').removeClass('hide');
var read_more_text = $this.attr('data-read-more-text');
jQuery(document).ready(function($){
$('.wplms_clp_step_read_more').on('click',function(event){
event.preventDefault();
var $this = $(this);
if( $this.hasClass('active') ){
$this.removeClass('active');
$this.parent().find('.wplms_clp_step_read').addClass('hide');
$this.parent().find('.wplms_clp_step_initial').removeClass('hide');
var read_more_text = $this.attr('data-read-more-text');
'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.',
<ion-header>
<ion-navbar color="transparent" >
<ion-buttons start>
<button ion-button menuToggle>
<ion-icon name="md-menu"></ion-icon>
</button>
</ion-buttons>
<ion-title>{{config.get_translation('home_title')}}<span [innerHtml]="config.get_translation('home_subtitle')"></span></ion-title>
<ion-buttons end>
<button ion-button (click)="openSearch()">
import { Component,ViewChild } from '@angular/core';
import { NavController, Slides } from 'ionic-angular';
import { ConfigService } from '../../services/config';
import { Storage } from '@ionic/storage';
import { TabsPage } from '../tabs/tabs';
import { LoginPage } from '../login/login';
[iframevideo]
<iframe src="https://cdn.jwplayer.com/players/yYKgP8pQ-h4HgIcQM.html" width="560" height="315" frameborder="0" allowfullscreen="">
</iframe>
[/iframevideo]
add_filter('wplms_course_metabox',function($args){
$args['vibe_app_course_description']=array( // Text Input
'label' => __('App Course description','vibe-customtypes'), // <label>
'desc' => __('This descrption is shown in App as course description'), // description
'id' => 'vibe_app_course_description', // field id and name
'type' => 'editor', // type of field
'std' => __('This message is shown as course description in app','vibe-customtypes')
);
return $args;
});