Get fields
fabrement-get-fieldsThe custom fields defined for a post type (Fabrement fields): every field with its name and meta key (fab_), retired ones marked "retired": true, the form layout and the revision. Call it before save-fields (you need its revision and the existing fields) and before a template reads fields. revision 0 = no fields yet. Templates read values with fabrement_get_field('', $id), the record id passed explicitly, never get_post_meta. Site-wide settings: get-options-page. "problem" = the field file is broken: nothing can be saved until the user fixes or removes wp-content/fabrement/fields/; tell them, do not recreate the fields. Rules: get-skill-doc {id:"fields-contract"} — read it before the first call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Post type slug, e.g. "project" or "page". | |
| type | Yes | Owner kind: "post", any post type with an admin screen (page, post, a Fabrement CPT, a plugin's type). Site-wide settings are not fields of a type: they are options pages (get-options-page / save-options-page). |