This file contains hidden or 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 home_page_first_last_name_redirect() { | |
if ( is_front_page() && is_user_logged_in() && ! isset( $_GET['firstName'] ) ) { | |
$user = wp_get_current_user(); | |
$url = add_query_arg( array( | |
'firstName' => $user->first_name, | |
'lastName' => $user->last_name, | |
)); | |
wp_redirect( $url ); |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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 | |
/** | |
* Genesis Front Page Manager | |
* | |
* @package Genesis_Front_Page_Manager | |
* @author Brad Potter | |
* @license GPL-2.0+ | |
* @link http://www.bradpotter.com/plugins/genesis-front-page-manager | |
* @copyright Copyright (c) 2014, Brad Potter | |
*/ |
This file contains hidden or 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
//* Add the site tagline section | |
add_action( 'genesis_after_header', 'minimum_site_tagline'); | |
function minimum_site_tagline() { | |
if ( !is_page( 'ಠ_ಠ' ) ) | |
printf( '<div %s>', genesis_attr( 'site-tagline' ) ); | |
genesis_structural_wrap( 'site-tagline' ); | |
printf( '<div %s>', genesis_attr( 'site-tagline-left' ) ); | |
printf( '<p %s>%s</p>', genesis_attr( 'site-description' ), esc_html( get_bloginfo( 'description' ) ) ); | |
echo '</div>'; |
This file contains hidden or 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 | |
add_filter( 'template_include', 'ja_template_check' ); | |
function ja_template_check( $template ) { | |
if ( is_category() ){ | |
// Get category information | |
$cat = get_query_var( 'cat' ); | |
$category_info = get_category( $cat ); | |
// News sub-categories, where 7 is the ID for News |
This file contains hidden or 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
#!/bin/bash | |
# args | |
MSG=${1-'deploy from git'} | |
BRANCH=${2-'trunk'} | |
# paths | |
SRC_DIR=$(git rev-parse --show-toplevel) | |
DIR_NAME=$(basename $SRC_DIR) | |
DEST_DIR=~/svn/wp-plugins/$DIR_NAME/$BRANCH |
This file contains hidden or 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: Bulleted Lists | |
new Bulleted_List(); | |
class Bulleted_List { | |
function __construct() { |
This file contains hidden or 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
#!/bin/bash | |
# | |
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html) | |
# modified by [email protected] | |
# modified by aconway@[redacted] - handle diffs that introduce new files | |
# modified by [email protected] - fixes diffs that introduce new files | |
# modified by [email protected] - fix sed syntax issue in OS X | |
# | |
# Generate an SVN-compatible diff against the tip of the tracking branch |