Skip to content

Instantly share code, notes, and snippets.

@Page-Carbajal
Created March 4, 2016 14:48
Embed
What would you like to do?
Building WordPress Custom Post Types Before Convention Over Configuration
<?php
namespace YourProject;
class Book extends BaseModel implements BaseModelInterface
{
public function __construct($bean = null)
{
parent::__construct($bean);
}
public function getPostType()
{
if( !isset(self::$postType) ){
static::$postType = 'post';
}
return static::$postType;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment