-
Notifications
You must be signed in to change notification settings - Fork 5
filters
Want to manipulate fields while you're saving or fetching them? Aeria keeps you covered. You can filter fields while saving them, or getting them.
It allows to manipulate the array of template paths for the render engine.
It allows to manipulate the array of aeria config paths.
It allows to manipulate the aeria configuration after all sub-transformation.
It allows to manipulate a section configuration retrieved by its id.
It is called on every field and it allows to manipulate its configuration before base transformation (aeria exposes some "virtual" fields that require a conversion to a real field, like the relation field that is converted to select).
It allows to manipulate a field configuration retrieved by its id before base transformation.
It allows to manipulate a field configuration retrieved by its id and context (e.g. aeria-meta-METAID-FIELDID) before base transformation.
It is called on every field and it allows to manipulate its configuration after base transformation.
It allows to manipulate a field configuration retrieved by its id after base transformation.
It allows to manipulate a field configuration retrieved by its id and context (e.g. aeria-meta-METAID-FIELDID) after base transformation.
It allows to manipulate a value before it is saved.
add_filter("aeria_set_metaexample-input-textarea", function ($value, $config){
return "I have hijacked this field's value!";
}, 10, 2);
It allows to manipulate a field configuration before it is passed to the admin interface.
It allows to manipulate a field configuration retrieved by its id before it is passed to the admin interface.
It allows to manipulate a field configuration retrieved by its id and context (e.g. aeria-meta-METAID-FIELDID) before it is passed to the admin interface.
It allows to manipulate a field value retrieved before it is returned.
It allows to manipulate a field value retrieved by its id and context (e.g. aeria-meta-METAID-FIELDID) before it is passed to the interface.
add_filter("aeria_get_metaexample-input-textarea", function ($value, $config){
return $value."edited";
}, 10, 2);
You can also manipulate field value by field type:
aeria_get_daterange
aeria_get_fieldset
aeria_get_gallery
aeria_get_maps
aeria_get_media
aeria_get_picture
aeria_get_relation
aeria_get_repeater
aeria_get_sections
aeria_get_select
aeria_get_switch