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 / 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 / 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 / footer.php
Created April 20, 2015 10:45
Custom Footer for Child theme
@MrVibe
MrVibe / header.php
Created April 20, 2015 11:58
WPLMS Header with alternate logo for Header Top
<?php
//Header File
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<title>
<?php echo wp_title('|',true,'right'); ?>
</title>
@MrVibe
MrVibe / curriculum.php
Created April 21, 2015 08:10
Display only completed units and quizzes in curriculum
<?php
/**
* The template for displaying Course Curriculum
*
* Override this template by copying it to yourtheme/course/single/curriculum.php
*
* @author VibeThemes
* @package vibe-course-module/templates
* @version 1.8.2
*/
@MrVibe
MrVibe / course-loop.php
Created April 22, 2015 07:24
Adding Course categories to Course item in Course directory
<?php
/**
* The template for displaying course directory loop.
*
* Override this template by copying it to yourtheme/course/course-loop.php
*
* @author VibeThemes
* @package vibe-course-module/templates
* @version 1.8.1
*/
@MrVibe
MrVibe / allinstructors.php
Created April 28, 2015 06:47
All instructors including custom user role, in below example "editor"
<?php
/**
* Template Name: All Instructors
*/
get_header();
$no=999;
$args = apply_filters('wplms_allinstructors',array(
'role' => 'instructor', // instructor