TLC Transients lives here now: https://github.com/markjaquith/WP-TLC-Transients
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 | |
CURRENT_PATH=`pwd` | |
INSTALL_FOLDER="public_html" | |
METHOD="HTTP" | |
HTTP_SOURCE="http://wordpress.org/latest.tar.gz" | |
SVN_SOURCE="" | |
SVN_SOURCE_BASE="http://core.svn.wordpress.org" | |
SVN_SOURCE_STABLE="/tags/2.9.2/" | |
SVN_SOURCE_TRUNK="/trunk/" |
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
#!/usr/bin/sh | |
# This script will overwrite an existing | |
# WordPress installation with the current | |
# head of trunk. Once it has been reverted, | |
# you may need to update the database, and | |
# WP will prompt you for that automatically. | |
# This is untested with these options! | |
# The script commands work from the command |
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 | |
define( 'MY_CPT', 'actor' ); | |
/** | |
* Redirects /cary-grant/ to /actor/cary-grant/ or whatever the correct URL is | |
*/ | |
function redirect_old_cpt_urls() { | |
if ( !is_404() ) | |
return; |
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
-- handy for moving a database from prouction to your local environment. | |
-- change URL's in wordpress single-site install. Replace with your own URL's. | |
-- this doesn't address serialized options. | |
UPDATE wp_options SET option_value = "http://localhost:8888" WHERE option_name = "home"; | |
UPDATE wp_options SET option_value = "http://localhost:8888" WHERE option_name = "siteurl"; | |
update wp_postmeta set meta_value = replace(meta_value, 'http://example.com', 'http://localhost:8888') where meta_key='_menu_item_url'; | |
update wp_posts set post_content = replace(post_content, 'http://example.com', 'http://localhost:8888'); |
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: MMC Parks and Features | |
* Description: This plugin demonstrates how to route parent/child URLs like http://example.com/parks/yosemite/half-dome/in WordPress 3.3 | |
* Author: Mike Schinkel | |
* Author URL: http://about.me/mikeschinkel | |
* Notes: | |
* To answer http://lists.automattic.com/pipermail/wp-hackers/2011-November/041486.html | |
* Assumes a metabox that sets $post->post_parent field for a park feature with it's park's $post->ID. | |
* |
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 | |
/***** | |
All new versions will be posted at | |
https://github.com/rmccue/Rotor_WPPlugin | |
Please use that repository instead of this Gist. | |
******/ |
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
function business_save_post($post_id, $post){ | |
// verify if this is an auto save routine. | |
// If it is our form has not been submitted, so we dont want to do anything | |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) | |
return; | |
// verify this came from the our screen and with proper authorization, | |
// because save_post can be triggered at other times | |
if ( isset( $_POST[ 'business_noncename' ] ) && !wp_verify_nonce( $_POST['business_noncename'], plugin_basename( __FILE__ ) ) ) |
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
// | |
// Make these columns sortable | |
// | |
function business_sortable_columns() { | |
return array( | |
'images' => 'images', | |
'title' => 'title', | |
"parking" => "parking" | |
); | |
} |
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
function wptest() { | |
TESTROOT=/Users/nacin/Sites/tests | |
ARGS="--colors $@" | |
FORCE=0 | |
DEBUG=0 | |
REPLACE=$(echo $ARGS | sed -e 's/ -f\>//') | |
if [ "$ARGS" != "$REPLACE" ]; then | |
FORCE=1 | |
ARGS=$REPLACE |
OlderNewer