Download the PHP package jjgrainger/posttypes without Composer
On this page you can find all versions of the php package jjgrainger/posttypes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jjgrainger/posttypes
More information about jjgrainger/posttypes
Files in jjgrainger/posttypes
Package posttypes
Short Description Simple WordPress custom post types.
License MIT
Homepage https://posttypes.jjgrainger.co.uk
Informations about the package posttypes
PostTypes v3.0.1
Modern PHP abstractions for WordPress post types and taxonomies.
Migrating from v2 to v3
Important: v3.0 is a breaking release. Existing v2 post type and taxonomy definitions will not work without modification. Please review the migration guide in the documentation on how to upgrade to version 3.
Requirements
Installation
Install with composer
Run the following in your terminal to install PostTypes with Composer.
PostTypes uses PSR-4 autoloading and can be used with the Composer's autoloader. See Composer's basic usage guide for details on working with Composer and autoloading.
Basic Usage
Create a custom post type
Custom post types are defined as classes that extend the base PostType class. At a minimum, the name method must be implemented to define the post type slug. All other methods are optional and allow you to configure labels, options, taxonomies, admin columns, filters, and more as needed.
Register a custom post type
Once the custom post type class is created it can be registered to WordPress by instantiating and call the register method.
Notes
- The full documentation can be found online at posttypes.jjgrainger.co.uk
- Licensed under the MIT License
- Maintained under the Semantic Versioning Guide
Author
Joe Grainger