Last active
December 19, 2015 08:19
-
-
Save szbl/5924534 to your computer and use it in GitHub Desktop.
Example of a plugin extending the Sizeable_Person object.
This file contains hidden or 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: 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