Esempio n. 1
0
 /**
  * Get the post type API
  *
  * @return mixed        Loads an existing type as a new PostType,
  *                      or returns a new PostTypeBuilder for registering a new type.
  */
 public static function postType()
 {
     return PostType::make(static::postTypeId());
 }
Esempio n. 2
0
 /**
  * @test
  * @expectedException Silk\PostType\Exception\NonExistentPostTypeException
  */
 function it_blows_up_if_it_tries_to_unregister_a_nonexistent_type()
 {
     $type = PostType::make('non-existent')->register();
     unregister_post_type('non-existent');
     $type->unregister();
 }