Matt Banks mattbanks

View functions.php
1 2 3 4 5 6 7 8
<?php
 
add_filter( 'tiny_mce_before_init', 'mb_unhide_kitchensink' );
 
function mb_unhide_kitchensink( $args ) {
$args['wordpress_adv_hidden'] = false;
return $args;
}
View taxonomy-query-loop.php
1 2 3 4 5 6 7 8 9 10
<?php
 
// Get terms
// http://codex.wordpress.org/Function_Reference/get_terms
// use $args array in second parameter if needed
$my_categories = get_terms( 'TERM_NAME_HERE' );
$my_categories_count = count( $my_categories );
 
if ( $my_categories_count > 0 && is_array( $my_categories ) ) {
echo '<div class="wrap">';
View wp-setup.sh
1 2 3 4 5 6 7 8 9 10
# Create directory for new site
cd ~/Sites
mkdir {query}
cd {query}
 
# Download latest version of WordPress
wp core download
 
# Setup wp-config file with WP_DEBUG enabled
wp core config --dbname={query} --dbuser=root --dbpass=root --dbprefix={query}wp_ --extra-php <<PHP
View gulpfile.js
1 2 3 4 5 6 7 8 9 10
// Load plugins
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')({ camelize: true }),
lr = require('tiny-lr'),
server = lr();
 
// Styles
gulp.task('styles', function() {
return gulp.src('assets/styles/source/*.scss')
.pipe(plugins.rubySass({ style: 'expanded', compass: true }))
View Vagrantfile
1 2 3 4 5 6 7 8 9 10
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
 
config.vm.network :private_network, ip: "192.168.204.72"
config.ssh.forward_agent = true
 
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 1024]
View Gruntfile.js
1 2 3 4 5 6 7 8 9 10
'use strict';
module.exports = function(grunt) {
 
// load all grunt tasks matching the `grunt-*` pattern
require('load-grunt-tasks')(grunt);
 
grunt.initConfig({
 
// watch for changes and trigger compass, jshint, uglify and livereload
watch: {
View Gruntfile.js
1 2 3 4 5 6 7 8 9 10
'use strict';
module.exports = function(grunt) {
 
// load all grunt tasks matching the `grunt-*` pattern
require('load-grunt-tasks')(grunt);
 
grunt.initConfig({
 
// watch for changes and trigger compass, jshint, uglify and livereload
watch: {
View mb_html5_doctype.php
1 2 3 4 5 6 7 8 9 10
/**
* HTML5 DOCTYPE
* removes the default Genesis doctype, adds new html5 doctype with IE8 detection
*/
 
function mb_html5_doctype() {
?>
<!DOCTYPE html>
<!--[if IE 8]> <html class="lt-ie9" <?php language_attributes( 'html' ); ?>> <![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes( 'html' ); ?>> <!--<![endif]-->
View php-expires-headers.php
1 2 3 4
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>
Something went wrong with that request. Please try again.