Architecture
How OpenFields works under the hood.
Overview
OpenFields consists of two main parts:
- PHP Plugin — Handles field storage, REST API, and meta box rendering
- React Admin — Modern UI for managing field groups and fields
Database Schema
OpenFields uses three custom tables:
wp_openfields_fieldsets
Stores field group definitions.
wp_openfields_fields
Stores field definitions within groups.
wp_openfields_locations
Stores where field groups appear.
Meta Storage
Field values are stored in standard WordPress meta tables:
wp_postmeta— for posts/pageswp_usermeta— for userswp_termmeta— for taxonomy terms
Values are stored directly under the field name (no prefix), making them ACF-compatible.
REST API
The React admin communicates with WordPress via REST API.
Location Matching
When WordPress loads a post edit screen, OpenFields determines which field groups to show:
- Get the context (post type, template, etc.)
- Query all active field groups
- For each group, evaluate location rules
- Rules in the same group use AND logic
- Different groups use OR logic
Technology Stack
PHP 7.4+WordPress 6.0+React 18TypeScriptZustandTailwind CSSViteshadcn/ui