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: Yearly Archives for Categories | |
Plugin URI: http://pmg.co/category/wordpress | |
Description: Adds an endpoint to categories for yearly archives. | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
License: Public Domain | |
*/ |
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
from __future__ import with_statement # we'll use this later, has to be here | |
from argparse import ArgumentParser | |
import requests | |
from BeautifulSoup import BeautifulStoneSoup as Soup | |
def parse_sitemap(url): | |
resp = requests.get(url) | |
# we didn't get a valid response, bail |
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
import socket, traceback | |
HOST = '' | |
PORT = 51235 | |
CLRF = '\r\n' | |
class InvalidRequest(Exception): | |
pass | |
class Request(object): |
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: Kill Trackbacks | |
Plugin URI: http://pmg.co/category/wordpress | |
Description: Kill all trackbacks on WordPress | |
Version: 1.0 | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
*/ |
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
re.compile(r'\b([^@\s([]+)\s*(\(|\[)?\s*(@|at)\s*(\)|\])?\s*(hotmail\s*(\(|\[)?\s*(\.|dot)\s*(\)|\])?\s*com)\b', re.I) |
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: wpse32871 Shortcode tester | |
*/ | |
add_action( 'init', 'wpse32871_add_shortcodes' ); | |
function wpse32871_add_shortcodes() | |
{ | |
add_shortcode( 'wpse32871', 'wpse32871_shortcode_cb' ); | |
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: Restrict Page Access | |
Plugin URI: https://gist.github.com/1338673 | |
Description: Allows administrators to give editors permission to edit only certain posts | |
Author: Christopher Davis | |
Author URI: http://christopherdavis.me | |
License: GPL2 | |
*/ |
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: wpse32973 Post Layout | |
Author: Christopher Davis | |
Author URI: http://www.christopherguitar.net/wordpress/ | |
Description: Change the post class (for styling purposes) so posts can be formatted correctly. | |
*/ | |
// register the meta box | |
add_action( 'add_meta_boxes', 'wpse32973_add_meta_box' ); |
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: Gallery Members (for wpse32840) | |
Description: Only allow members to view one page | |
Author: Christopher Davis | |
Author URI: http://www.christopherguitar.net/ | |
*/ | |
register_activation_hook( __FILE__, 'wpse32840_activation' ); | |
function wpse32840_activation() |