Skip to content

Commit

Permalink
Added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Polmonite committed Sep 23, 2019
1 parent 99bab29 commit 743c049
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Malini Aeria

Malini Accessors and Decorators for Aeria.

Depends on both:
* [Malini](https://github.com/caffeinalab/malini);
* [Aeria](https://github.com/caffeinalab/aeria).

## Decorators:

Adds the **Aeria** decorator:

```
malini_post()->decorate('aeria');
```

Accepted options:
- `filter`: the attributes we want to retrieve; [see filter option syntax](other/filter-option-syntax);
- `automerge_fields`: if `false` specifies that the attributes retrieved will be nested inside an `aeria_fields` key; otherwise they will be added at the root level (defaults to `false`).

## Accessors:

`@aeria:{metabox_id},{field_id},{default}`

- `metabox_id`: the id of the wanted metabox; if no `metabox_id` is provided, all **Aeria** meta fields will be retrieved for this post;
- `field_id`: the id of the wanted field in this metabox; if no `field_id` is provided, all **Aeria** meta fields of this metabox will be retrieved;
- `default`: default value if the field is not set for this post; defaults to `null`.

0 comments on commit 743c049

Please sign in to comment.