-
Notifications
You must be signed in to change notification settings - Fork 5
configuration_getting started
Alberto Parziale edited this page Apr 28, 2020
·
5 revisions
You are able to configure Aeria by inserting files in your theme. Aeria supports both of JSON and PHP. Aeria looks for configuration files in the themes/[Your Active Theme]/aeria-config. Aeria searches recursively in the subdirectories: you can order your config files as you like.
Each of your configuration files must contain Aeria's 3 required fields:
-
"name"defines the internal name for this config file. -
"kind"defines the type of configuration: there are 7 possible types of configuration files. Check the Kinds of configuration files -
"spec"defines the specific configurations for the object. Its fields are different based on the kind of configuration. Check the specific configuration article to know more.
Since the release 1.0.2 of Aeria, you can include a fourth attribute: enabled, a boolean, containing false if the configuration file has to be skipped. By default it is true.
Aeria currently supports 9 types of configuration files:
-
post-typedeclares a new post type. -
taxonomydeclares a new taxonomy. -
groupdeclares a new group. -
metadeclares a new metabox. -
sectiondeclares a new type of section available in the metaboxes. -
controllerdeclares a new controller. -
routedeclares a new API route. -
optionsdeclares a new options page. -
extensiondeclares a new extension.
Please note that no other kind of configuration file is currently supported, and declaring something else will result in an error.
<?php
return [
"name" => "sample_extension",
"spec" => [],
"kind" => "extension"
]{
"name": "sample_extension",
"spec": {},
"kind": "extension"
}