Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Davis chrisguitarguy

View GitHub Profile
@chrisguitarguy
chrisguitarguy / remove-attachments.php
Created Aug 28, 2011
Ridirect Wordpress attachment pages
View remove-attachments.php
<?php
/*
Plugin Name: Kill Attachment Pages
Plugin URI: http://pmg.co/
Description: Redirects all attachment pages to their parent page
Version: 1.0
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: creative commons/GPL2
*/
@chrisguitarguy
chrisguitarguy / add-excerpt-shortcodes.php
Created Aug 28, 2011
Add shortcodes back to auto generated excerpts in wordpress
View add-excerpt-shortcodes.php
<?php
/*
Plugin Name: Add Shortcodes (For WordPress Answers #27119)
Plugin URI: http://pmg.co/
Description: Adds shortcodes to the excerpt
Version: 1.0
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: creative commons/GPL
*/
@chrisguitarguy
chrisguitarguy / update-thumbnails.php
Created Aug 28, 2011
Programmatically update WordPress post thumbnails from old style custom fields with URLs
View update-thumbnails.php
<?php
/*
Plugin Name: Update thumbnails
Plugin URI: http://pmg.co
Description: Takes a url from a custom field and turns it into a thumbnail ID
Version: .01
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
*/
@chrisguitarguy
chrisguitarguy / custom-shortlink.php
Created Aug 29, 2011
Adds a custom shortlink structure to WordPress
View custom-shortlink.php
@chrisguitarguy
chrisguitarguy / front.php
Created Aug 30, 2011
SEO Auto Linker Fix
View front.php
<?php
class pmgSeoAutoLinkerFront
{
function __construct()
{
add_filter( 'the_content', array( &$this, 'content' ), 1, 1 );
}
function content( $content )
{
@chrisguitarguy
chrisguitarguy / wp-registration-keys.php
Created Aug 30, 2011
Only lets users with an invite code register for a WordPress site.
View wp-registration-keys.php
<?php
/*
Plugin Name: WP Invite Codes
Plugin URI: http://pmg.co/
Description: Makes wordpress an invite only community.
Version: n/a
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
*/
@chrisguitarguy
chrisguitarguy / wp-dlvrit.php
Created Sep 1, 2011
Dlvr.it API class for WordPress
View wp-dlvrit.php
<?php
// http://pmg.co
class wpDlvrit
{
protected $key;
function __construct( $key = false )
{
$this->set_key( $key );
}
@chrisguitarguy
chrisguitarguy / rewrite-endpoint.php
Created Sep 3, 2011
Adds a custom rewrite endpoint to WordPress for displaying galleries in the place of content.
View rewrite-endpoint.php
<?php
/*
Plugin Name: Gallery Rewrite (for wpse27638)
Plugin URI: http://pmg.co
Description: Builds cutom rewrites to display a gallery or not.
Version: 1
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: creative commons/GPL2
*/
@chrisguitarguy
chrisguitarguy / image-above-title.php
Created Sep 4, 2011
Adds an image above the title on the WordPress post editing screen.
View image-above-title.php
<?php
/*
Plugin Name: Image Above Title
Plugin URI: http://pmg.co
Description: Adds an image above the title on the WordPress post editing screen.
Version: n/a
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: creative commons/GPL2
*/
@chrisguitarguy
chrisguitarguy / cat-list-example.php
Created Sep 6, 2011
Custom category list display for WordPress
View cat-list-example.php
<?php
/*
Plugin Name: Get Terms Example
Plugin URI: http://pmg.co
Description: Get a list of all the categories and format them pretty like for output
Version: n/a
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: Creative Commons/GPL2
*/