Skip to content

Instantly share code, notes, and snippets.

View tannerm's full-sized avatar

Tanner Moushey tannerm

View GitHub Profile
@tannerm
tannerm / oo.js
Last active August 29, 2015 13:59
JavaScript Object Oriented
(function($) {
'use strict';
var myTestClass = function() {
var SELF = this;
SELF.init = function() {};
}
@tannerm
tannerm / protected.php
Created April 7, 2014 05:47
Protected content template
<?php
/** template for protected content when password is not found */
get_header(); ?>
<div class="main-content" id="content" role="main">
<h1 class="top-heading"></h1>
<div class="intro"></div>
<?php the_content(); ?>
</div>
@tannerm
tannerm / functions.php
Last active August 29, 2015 13:58
Password protect content.
<?php
/**
* Redirect password protected content to it's own file
*/
function tm_password_protect_redirect() {
// if password is not required or has been entered, continue with standard behavior
if ( ! post_password_required() ) {
return;
}
@tannerm
tannerm / functions.php
Last active August 29, 2015 13:57 — forked from flowdee/functions.php
<?php
/**
* Remove trailing parenthesis from youtube oembed
*
* @param $html
* @param $url
*
* @return mixed
*/