DefinitionRegistrar
in package
FinalYes
Registers declarative host definitions (post types, taxonomies, cron intervals) with WordPress. The WP counterpart of the moodle adapter's `Definition/` concern: describe the plugin's registrations as data, wire them in one call from the `init` hook.
Table of Contents
Methods
- register() : void
- registerSchedules() : void
- registerShortcode() : void
Methods
register()
public
register(array<int, CronScheduleDefinition|PostTypeDefinition|ShortcodeDefinition|TaxonomyDefinition> $definitions) : void
Parameters
- $definitions : array<int, CronScheduleDefinition|PostTypeDefinition|ShortcodeDefinition|TaxonomyDefinition>
registerSchedules()
private
registerSchedules(array<int, CronScheduleDefinition> $schedules) : void
Parameters
- $schedules : array<int, CronScheduleDefinition>
registerShortcode()
private
registerShortcode(ShortcodeDefinition $definition) : void
Parameters
- $definition : ShortcodeDefinition