Skip to content

Instantly share code, notes, and snippets.

@Page-Carbajal
Created March 4, 2016 14:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Page-Carbajal/75bbdc11e503f615b699 to your computer and use it in GitHub Desktop.
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