I hereby claim:
- I am kingkool68 on github.
- I am kingkool68 (https://keybase.io/kingkool68) on keybase.
- I have a public key whose fingerprint is 23B6 C578 8286 FD7B 9E83 4C10 3B56 93AA 987B D9BF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
/* | |
* Base | |
* | |
*/ | |
// basic XFBML load into footer | |
function psc_fb_load_args() { | |
/* | |
global $sfc_comm_comments_form; |
<?php | |
/** | |
* Plugin Name: Only Certain Logins Allowed | |
* Description: Only let certain usernames do anything... | |
* Version: 1.0 | |
* Author: Russell Heimlich | |
* Author URI: https://twitter.com/kingkool68 | |
*/ | |
function only_certain_logins_allowed() { |
<?php | |
/* Short and sweet */ | |
define('WP_USE_THEMES', false); | |
require('./wp-blog-header.php'); | |
$url = 'https://api.uber.com/v1/estimates/price'; | |
$args = array( | |
/* | |
'headers' => array( | |
'Authorization' => $some_token_goes_here |
<?php | |
/* | |
Plugin Name: Simple Metabox Example | |
Description: Here's a barebones metabox example | |
Version: 1.0 | |
Author: Russell Heimlich | |
Author URI: http://www.russellheimlich.com | |
*/ | |
//Hook in to the load-post.php and load-post-new.php to determine if we want to show our metabox or not. If you only want to show your metabox on the screen once the post has been saved as a draft or published (aka not a brand new post) then remove the load-post-new.php action.... |
<?php | |
function api_footnotes( $content ) { | |
$post_id = get_the_ID(); | |
//Need to correct wpautop() which smart-quoteify's the " in the numoffset argument. | |
$content = preg_replace('/numoffset=”(\d+)″/i', 'numoffset="$1"', $content); | |
//Microsoft has some weird space characters that Mac/Unix systems don't have. What the next line does is replace the weird space characters with a real space character which makes the regex work... | |
$content = str_replace('[ref ', '[ref ', $content); | |
<?php | |
/** | |
* Helper conditionals to run code in certain environments. | |
*/ | |
if ( ! defined( 'RH_ENV' ) ) { | |
$hostname = $_SERVER['HTTP_HOST']; | |
if ( isset( $_SERVER['HTTP_X_FORWARDED_HOST'] ) && ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) { | |
$hostname = $_SERVER['HTTP_X_FORWARDED_HOST']; | |
} |
<?php | |
/* | |
Plugin Name: Pew Archive Filters | |
Description: Adds re-write rules and helper functions that make filtering archives by year and/or a taxonomy possible. | |
Version: 0.2 | |
Author: Russell Heimlich | |
Author URI: http://www.russellheimlich.com | |
*/ | |
function pew_archive_filter_rewrite_rules( $wp_rewrite ) { |