A Pen by Austin Pray on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.require_version '>= 1.5.1' | |
Vagrant.configure('2') do |config| | |
config.vm.box = 'precise64' | |
config.vm.box_url = 'http://files.vagrantup.com/precise64.box' | |
config.vm.network :private_network, ip: '192.168.50.5' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first some helpful mixins | |
.abs { | |
position: absolute; | |
} | |
.rel { | |
position: relative; | |
} | |
.position(@top; @right; @bottom; @left) { | |
top: @top; | |
right: @right; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function populate_gravity_forms($field) { | |
if(class_exists('RGFormsModel')) { | |
$forms_array = array(); | |
$forms = RGFormsModel::get_forms(null, 'title'); | |
foreach($forms as $form) { | |
$forms_array[$form->id] = $form->title; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Image Optimizer | |
Plugin URI: | |
Description: Automatically optimizes images using jpegtran and optipng on upload | |
Version: 0.1 | |
Author: Scott Walkinshaw | |
Author URI: | |
Support URI: | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Integrate Imager.js with WordPress | |
* | |
* Imager.js is BBC's solution for serving responsive and retina images, without | |
* the double payload issues that affect other solutions. For more information: | |
* | |
* https://github.com/BBC-News/Imager.js/ | |
* | |
* This collection of functions modifies the output of WordPress's |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
result = [] | |
count = 0 | |
# Loop through each reel | |
$('.reel-outer'). each -> | |
$this = $(this) | |
index = $this.index() | |
spinPlus = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* entire container, keeps perspective */ | |
body .flip-container { | |
width: 100%; | |
} | |
body .flip-container .flipper { | |
position: relative; | |
} | |
/* hide back of pane during swap */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
wp_nav_menu( array( | |
'menu' => 'Menu Name', | |
'sub_menu' => true, | |
'direct_parent' => true | |
) ); |
OlderNewer