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
<h2>Shortcode models</h2> | |
For each heading below, you'll see shortcode content appear <i>if </i>you're in the right area. | |
To spoof being in an area, add this to your URL | |
<pre>http://mywebsite.com/?geoip&country=US </pre> | |
Note that <pre> country </pre> and <pre> US </pre> can be any values you want. | |
--- |
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 | |
class cptGenerator { | |
public static function create( $single = '', $plural = '', $args = array() ) { | |
if( empty( $plural ) ) | |
$plural = $single . 's'; | |
$labels = array( | |
'name' => __( ucfirst( $plural ), 'post type general name', 'tpc' ), |
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 | |
// (Don't copy the opening PHP tag above) | |
/** | |
* Add Google Analytics in the header | |
*/ | |
add_action( 'wp_head', 'wcraleigh_add_ga_tracking', 1 ); | |
function wcraleigh_add_ga_tracking() { | |
?> | |
<!-- Start Google Analytics --> |
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
#!/bin/bash | |
# Typical Usage | |
# $ jira MAR-1234-description | |
git checkout staging; | |
if [[ $? != 0 ]]; then | |
echo "git isn't clean. aborting." | |
exit 1; |
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
#!/bin/bash | |
## Typical usage | |
# gitclean | |
# gitclean remote | |
say() { echo "$0: $*" >&2; } | |
die() { say "$*"; exit 111; } | |
try() { "$@" || die "cannot $*"; } |
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: Always log in | |
Version: 0.1 | |
Description: If authentication fails, just log in as user #1. ONLY FOR DEV SITES | |
Author: ryanshoover | |
*/ | |
/** | |
* Always log in if you submit the login form |
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
// Style the wpadminbar based on site type | |
#wpadminbar { | |
body.developer & { | |
background-color: $teal; | |
} | |
body.devsite & { | |
background-color: $darkblue; | |
} |
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
// Define the environment if we don't have one already | |
if ( ! defined( 'WPE_ENVIRONMENT' ) ) { | |
// Test to see if we're in staging | |
if ( isset( $_SERVER['IS_WPE_SNAPSHOT'] ) && $_SERVER['IS_WPE_SNAPSHOT'] ) { | |
define( 'WPE_ENVIRONMENT', 'staging' ); | |
} else { | |
define( 'WPE_ENVIRONMENT', 'production' ); | |
} | |
} |
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: WP-ATX MS Demo | |
Plugin URI: http://wpaustin.com | |
Description: Demoing WordPress Multisite Features | |
Version: 0.1 | |
Author: ryanshoover | |
License: GPLv2 or later | |
Text Domain: wpatxms | |
*/ |
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: Rowley Redirect | |
* Description: Redirect old links for posts to the current link | |
* Author: Ryan Hoover | |
* Author URI: https://github.com/ryanshoover | |
* Version: 0.1 | |
*/ | |
/** |
OlderNewer