Skip to content

Instantly share code, notes, and snippets.

@MrVibe
MrVibe / tin-can.xsd
Created February 16, 2014 09:45
TINCAN API XSD
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://projecttincan.com/tincan.xsd" elementFormDefault="qualified" xmlns="http://projecttincan.com/tincan.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tc="http://projecttincan.com/tincan.xsd">
<xs:element name="tincan" type="tincan">
</xs:element>
<xs:complexType name="tincan">
<xs:sequence>
<xs:element name="activities" type="activities" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="activity">
@MrVibe
MrVibe / customizer_class.php
Created January 3, 2015 13:46
WPLMS : Redirect student to the Custom section after Login
<?php
if(!class_exists('WPLMS_Customizer_Plugin_Class'))
{
class WPLMS_Customizer_Plugin_Class // We'll use this just to avoid function name conflicts
{
public function __construct(){
add_filter('login_redirect',array($this, 'buddypress_login_redirection'),100,3);
} // END public function __construct
@MrVibe
MrVibe / customizer_class.php
Last active April 12, 2022 02:46
Custom User field in Course stats download version 4 compatible.
<?php
if(!class_exists('WPLMS_Customizer_Plugin_Class'))
{
class WPLMS_Customizer_Plugin_Class // We'll use this just to avoid function name conflicts
{
public function __construct(){
add_filter('wplms_course_stats_list',array($this,'add_custom_course_stat'));
add_action('wplms_course_stats_process',array($this,'process_custom_course_stat'),10,7);
} // END public function __construct
@MrVibe
MrVibe / start.php
Last active August 29, 2015 14:17
FullWidth Start Course Page
<?php
/**
* Template Name: New Start Course Page
*/
/*=================================================*/
/* INSTALLATION NOTESwplms_unit_header
/* 1. Add this file to the WPLMS Child theme
/* 2. Edit the Course status/start course page and select the page template "New Start Course Page"
/* 3. Verify this page is selected in the WPLMS -> Course manager -> Take this course page
@MrVibe
MrVibe / page-members.php
Created March 20, 2015 06:08
Members Only
<?php
/**
* Template Name: Members Access Only
*/
if(!is_user_logged_in())
wp_die('<h2>'.__('This Page is only accessible to Members','vibe').'</h2>'.'<p>'.__('The page is only accessible to site Users, please register in site to see this content.','vibe').'</p>',__('Members only page','vibe'),array('back_link'=>true));
get_header();
@MrVibe
MrVibe / course_product.php
Created March 24, 2015 13:08
Course product shortcode
/*-----------------------------------------------------------------------------------*/
/* Course Product
/*
/* USAGE : xx is course id
/* [course_product id="xx" details="price"]
/* [course_product id="xx" details="sku"]
/* [course_product id="xx" details="sales"]
/* [course_product id="xx" details="note"]
/* Above shortcode can also be used on certificate pages and remove the id field:
@MrVibe
MrVibe / single.php
Created March 25, 2015 07:37
Single Posts without featured image
<?php
get_header();
if ( have_posts() ) : while ( have_posts() ) : the_post();
$title=get_post_meta(get_the_ID(),'vibe_title',true);
if(!isset($title) || !$title || (vibe_validate($title))){
?>
@MrVibe
MrVibe / customiser_class.php
Created March 25, 2015 11:29
Add custom stats in download stats section of Quiz
<?php
if(!class_exists('WPLMS_Customizer_Plugin_Class'))
{
class WPLMS_Customizer_Plugin_Class // We'll use this just to avoid function name conflicts
{
public function __construct(){
add_filter('wplms_download_mod_stats_fields',array($this,'custom_wplms_download_mod_stats_fields'),10,2);
add_action('wplms_mod_stats_process',array($this,'custom_wplms_mod_stats_process'),10,7);
} // END public function __construct
@MrVibe
MrVibe / customizer_class.php
Created March 27, 2015 13:50
For WPengine Hosted sites
<?php
if(!class_exists('WPLMS_Customizer_Plugin_Class'))
{
class WPLMS_Customizer_Plugin_Class // We'll use this just to avoid function name conflicts
{
public function __construct(){
add_filter('wplms_login_widget_action',array($this,'mycustom_login_url'));
} // END public function __construct
public function activate(){
@MrVibe
MrVibe / footer.php
Created April 20, 2015 10:45
Custom Footer for Child theme