Skip to content

Instantly share code, notes, and snippets.

@db-ryan
db-ryan / receive_php.php
Created February 19, 2012 00:54
exec(php -l *); on OSX
<?php
// Get the text from the text box
$text = stripslashes($_POST["text"]);
// Open a temporary file
$directory = './temp';
$prefix = 'temp_';
$temp_filename = tempnam( $directory, $prefix );
// Make sure the temp file was created
@db-ryan
db-ryan / register_taxonomies_and_cpts.php
Created December 5, 2012 17:23
Custom Taxonomies Return 404 Page
<?php
flush_rewrite_rules();
/* COUPON CATEGORY TAXONOMY
* **************************************************************************************/
add_action( 'init', 'coupons_register_category_taxonomy' );
function coupons_register_category_taxonomy() {
$labels = array(
'name' => 'Coupon Category',
'singular_name' => 'Coupon Category',