Download the PHP package wpfulcrum/post-type without Composer
On this page you can find all versions of the php package wpfulcrum/post-type. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wpfulcrum/post-type
More information about wpfulcrum/post-type
Files in wpfulcrum/post-type
Package post-type
Short Description Fulcrum Post Type Module - custom post types made easy.
License MIT
Homepage https://github.com/wpfulcrum/post-type
Informations about the package post-type
Post Type Module
The Fulcrum Custom Post Type Module makes your job easier for adding custom post types to your project. Pass it a configuration and it handles the rest for you.
Features
- Registration is handled for you.
- Label generation - handy when you do not need internationalization.
- Supported features builder - handy when you want the supports that other plugins and/or the theme adds.
- Stores in Fulcrum's Container - when added, automatically stores it in the Container for global usage.
- Column filtering, sorting, and configuration are all handled for you.
Installation
The best way to use this component is through Composer:
Dependencies
This module requires:
- at least PHP 5.6
- WordPress 4.8+
Configuring a Custom Post Type
This module, as with all Fulcrum modules, is configuration driven as part of the ModularConfig design pattern. In your theme/plugin's configuration folder, you will want to create a configuration file. Here is the basic structure of that file:
Making It Work
There are 2 ways to utilize this module:
- With the full Fulcrum plugin.
- Or on its own without Fulcrum.
With Fulcrum
In Fulcrum, your plugin is an Add-on. In your plugin's configuration file, you will have a parameter for the serviceProviders
, where you list each of the service providers you want to use. In this case, you'll use the provider.post_type
.
For example, using our Book configuration above, this would be the configuration:
Fulcrum's Add-On Module handles flushing the rewrites upon plugin activation and deactivation. That saves you time.
Without Fulcrum
Without Fulcrum, you'll need to instantiate each of the dependencies and PostType
. For example, you would do:
You will need to handle flushing the rewrites with your plugin's activation and deactivation.
Contributing
All feedback, bug reports, and pull requests are welcome.
All versions of post-type with dependencies
wpfulcrum/config Version ^3
wpfulcrum/extender Version ^3
wpfulcrum/foundation Version ^3