-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Loïc Antignac edited this page May 16, 2022
·
24 revisions
Library allowing to easily create with an array:
- Custom Post Type
- Custom Taxonomy
- ACF Option Page
- Native Option Page
- Group of Settings attached to a native option page:
- text
- number
- textarea
- datetime-local
- checkbox
- toggle
- image
- Custom Role (add, update and remove)
- Custom Block Category
- Custom Block Pattern Category (add, remove)
The array is an associative array with 3 main keys: entity, labels, and settings:
[
'entity' => 'Webaxones\Core\Classification\PostType',
'labels' => [
],
'settings' => [
],
];
- The entity key defines the entity to create by passing the class name. (Classes are listed in the table below)
- The labels key passes all of the entity's labels requiring internationalization.
- The settings key passes all the parameters the entity needs to be processed.
Entity | Class |
---|---|
Custom Post Type | Webaxones\Core\Classification\PostType |
Custom Taxonomy | Webaxones\Core\Classification\Taxonomy |
ACF Option Page | Webaxones\Core\Option\AcfOptionsPage |
Native Option Page | Webaxones\Core\Option\OptionsPage |
Group of settings | Webaxones\Core\Option\SettingGroup |
Custom Role | Webaxones\Core\Role\Role |
Custom Block Category | Webaxones\Core\Editor\Categories\BlockCategory |
Custom Block Pattern Category | Webaxones\Core\Editor\Categories\BlockPatternCategory |