TLC Transients
TLC Transients lives here now: https://github.com/markjaquith/WP-TLC-Transients
<?php | |
function gigaom_script_slug_swap( $pairs ) { | |
global $wpdb; | |
foreach ( $pairs as $pair ) { | |
$_temp_name = $pair[0] . '-gigaom-temp-123456789'; | |
$slugs = "'" . implode( "', '", $pair ) . "'"; | |
$ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND post_name IN( $slugs ) LIMIT 2" ); | |
$wpdb->update( $wpdb->posts, array( 'post_name' => $_temp_name ), array( 'post_status' => 'publish', 'post_type' => 'post', 'post_name' => $pair[0] ) ); | |
$wpdb->update( $wpdb->posts, array( 'post_name' => $pair[0] ), array( 'post_status' => 'publish', 'post_type' => 'post', 'post_name' => $pair[1] ) ); | |
$wpdb->update( $wpdb->posts, array( 'post_name' => $pair[1] ), array( 'post_status' => 'publish', 'post_type' => 'post', 'post_name' => $_temp_name ) ); |
<?php | |
/* | |
Plugin Name: Employee List | |
Description: Leverages an existing "employee" custom post type to create a shortcode for a list of employees | |
Version: 0.1 | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ | |
function tampa_employee_list() { |
#!/bin/bash | |
# | |
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html) | |
# modified by mike@mikepearce.net | |
# modified by aconway@[redacted] - handle diffs that introduce new files | |
# modified by t.broyer@ltgt.net - fixes diffs that introduce new files | |
# modified by m@rkj.me - fix sed syntax issue in OS X | |
# | |
# Generate an SVN-compatible diff against the tip of the tracking branch |
<?php | |
// Change /*CUSTOMIZE_THIS*/ to a unique name (two places). Go ahead, make it long. | |
// Like, your initials, and your full plugin name. | |
// e.g. MTJ_Some_Awesome_Plugin_Controller | |
/*CUSTOMIZE_THIS*/_Controller::init(); | |
class /*CUSTOMIZE_THIS*/_Controller { | |
function init() { |
<?php | |
/* | |
Plugin Name: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
<?php | |
/* | |
Plugin Name: CWS Posts Per Page | |
Version: 0.1 | |
Description: Sets a custom number of posts to display per page, for specific types of views | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ | |
class CWS_Posts_Per_Page_Plugin { |
<?php | |
class FCC_Safe_Harbor_Indecency_Plugin { | |
static $instance; | |
private $seven_dirty = array( | |
'shit(s|ty|head)?' => '{BLEEP}$1', | |
'piss(es|ed|ing)?' => '{BLEEP}$1', | |
'fuck(s|er|ers|ing|ed)?' => '{BLEEP}$1', | |
'cunt([ys])?' => '{BLEEP}$1', | |
'cock(sucker[s]?)' => '{BLEEP}$1', |
<?php | |
/* | |
Plugin Name: Disable Comment Querying | |
Description: Disables comment queries | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
TLC Transients lives here now: https://github.com/markjaquith/WP-TLC-Transients