Skip to content

Instantly share code, notes, and snippets.

@szbl
Last active December 19, 2015 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szbl/5924534 to your computer and use it in GitHub Desktop.
Save szbl/5924534 to your computer and use it in GitHub Desktop.
Example of a plugin extending the Sizeable_Person object.
<?php
/*
Plugin Name: Extend Sizeable Person
Description: Adds post thumbnails, excerpts and page attributes to People post type. Also, sets URL slug to /people/ instead of /szbl-person/
Author: theandystratton
Version: 1.0
License: GPL2+
*/
add_filter( 'szbl_people-post_type_args', 'szbl_people_filter_post_type_args' );
function szbl_people_filter_post_type_args( $args )
{
$args['supports'] = array( 'title', 'editor', 'custom-fields', 'thumbnail', 'excerpt', 'page-attributes' );
$args['rewrite'] = array( 'slug' => 'people' );
return $args;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment