Post Type Modules
Modules extend the functionality of a post type like Contacts or Groups. A modules can be used to add:
Fields
Workflows
List filters
Roles
Other functionality
A module resembles what can be done through a plugin. The big difference is the instance admin can enable/disable the modules they want and the theme/plugins can package multiple modules.
With v1.0 the D.T theme has 2 main modules available by default: the DMM module and the Access modules. The DMM adds fields, filters and workflows that go with: coaching, faith milestones, baptism date, baptisms etc. These are fields needed for any DMM. The Access module focuses more on contact followup and come with fields like the seeker path, the assigned_to and subassigned. It also adds our Follow-up filter tab on the lists page.
Getting The Module List
How To Add A Modules
Declaring The Module
Hook into the dt_post_type_modules
filter.
The Module Class
See dt-contacts/access-module.php as an example.
Keep in mind:
extend
DT_Module_Base
.declare the $post_type and $module public variables.
call
self::check_enabled_and_prerequisites()
to only load if:the module is enabled in the settings.
the prerequisites are also enabled.
Last updated