Credit Chris Coyier (@chriscoyier)
-
Concatinating Files ( grunt-contrib-concat )
npm install grunt-contrib-concat --save-dev
-
Minify ( grunt-contrib-uglify )
npm install grunt-contrib-uglify --save-dev
add_filter( 'request', 'my_request_filter' ); | |
function my_request_filter( $query_vars ) { | |
if( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) { | |
$query_vars['s'] = " "; | |
} | |
return $query_vars; | |
} |
Credit Chris Coyier (@chriscoyier)
Concatinating Files ( grunt-contrib-concat )
npm install grunt-contrib-concat --save-dev
Minify ( grunt-contrib-uglify )
npm install grunt-contrib-uglify --save-dev
<?php | |
function form($instance){ | |
/** Merge with defaults */ | |
$instance = wp_parse_args( (array) $instance, $this->defaults ); //Only if you set defaults in constructor (i.e.- $this->defaults = array(); ) | |
extract ( $instance, EXTR_SKIP); | |
//Create new fields by adding to this array | |
$fields = array( | |
'title' => array( | |
'label' => __( 'Title', 'div' ), |
Developing locally? Here's a quick snippet for ignoring your local wp-config.php settings
git update-index --assume-unchanged -- wp-config.php
Thanks to Linquize: http://stackoverflow.com/a/14513920/1058371
####Use on other settings files as well
git update-index --assume-unchanged -- wp-content/sftp-config.json
SSH_ENV=$HOME/.ssh/environment | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} | |
echo succeeded | |
chmod 600 ${SSH_ENV} | |
. ${SSH_ENV} > /dev/null |
##Basics
--st: status
git config --global alias.st status
--ci: commit -m
git config --global alias.ci 'commit -m'
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |