Kodeleon Tables
Custom data tables manager for WordPress. Create dynamic data structures with custom fields, expose them via REST API with configurable schemas and multi-ratio image support. Features sharing sessions with public editors, admin review with diff comparison, universal filter builder, and role-based access control.
by Marek Wasyluk · github.com/mwasyluk/kodeleon-tables · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mwasyluk/kodeleon-tables/archive/refs/heads/main.zipHeadless data tables manager for WordPress.
Kodeleon Tables lets you create dynamic data structures in the WordPress admin panel and expose them via a public REST API for headless frontends built with React, Next.js, or any other framework.
- Version: 2.1.1
- Author: Marek Wasyluk / Kodeleon.pl
- License: Proprietary
- Requires: WordPress 5.8+ | PHP 7.4+
Table of Contents
Requirements
| Requirement | Minimum Version |
|---|---|
| WordPress | 5.8+ |
| PHP | 7.4+ |
Installation
- Upload the
kodeleon-tablesplugin directory towp-content/plugins/. - Activate the plugin through the Plugins menu in WordPress.
- Navigate to Kodeleon Tables in the admin sidebar to create your first table.
Features
Dynamic Tables
Create custom data tables directly in the WordPress admin panel. Each table has its own slug, set of configurable fields, and dedicated REST API endpoints. Tables can be published or kept in draft status.
Field Types
Each field in a table is assigned one of the following types:
| Type | Description |
|---|---|
text |
Single-line text input |
textarea |
Multi-line plain text |
int |
Integer number |
decimal |
Decimal / floating-point number |
bool |
Boolean toggle (true/false) |
date |
Date value |
datetime |
Date and time value |
media |
WordPress media attachment with optional crop and WebP support |
url |
URL string |
json |
Arbitrary JSON data |
Record Management
Full CRUD operations for every table with built-in validation, configurable sort order, and pagination. Records can be managed through the admin interface or programmatically via the REST API.
Media Handling
Kodeleon Tables provides advanced image processing features for media fields:
- Aspect Ratio Management -- Configure one or more crop ratios per media field using a combo + chips UI in the admin panel.
- Server-side Cropping -- Cropped variants are generated automatically and cached in
wp-content/uploads/kt-crops/. - WebP Conversion -- Enable automatic WebP generation on a per-field basis for smaller file sizes.
- Size Presets -- Define image size presets (thumbnail, small, medium, large, full) with custom dimensions.
- Multi-ratio srcset (v2.0) -- API schemas can return multiple image ratios per field, complete with
srcsetdata for responsive images. - Deferred Upload (v2.1) -- In the public session editor, selected files are stored locally until the user clicks Save. This prevents orphaned attachments in the WordPress Media Library when users change their mind before submitting.
API Schemas
Schemas let you define different response shapes for the same table. Use them to control which fields are included in the API output, specify image sizes for media fields, and apply pre-configured filters. Each table can have multiple named schemas; consumers select one via the schema query parameter.
Import and Export
Bulk data operations are available through the admin panel and the REST API. Three import modes are supported:
| Mode | Behavior |
|---|---|
append |
Add new records without modifying existing ones |
upsert |
Insert new records and update existing ones (matched by ID) |
replace |
Remove all existing records and replace with imported data |
Sharing Sessions
Introduced in v1.2, expanded in v2.0 and v2.1.
Generate secret, time-limited editing links that allow external collaborators to view and modify table records without a WordPress account.
- Secret Link Sharing -- Each session produces a unique token-based URL with a configurable expiration.
- Session Configuration (v2.0) -- Control which fields are visible or editable, designate a header field, and set sorting and filter rules for the session.
- Accordion Editor -- The public session page presents records in a modern expandable accordion layout.
- Edit Status Tracking -- Visual indicators show whether each record is unchanged, modified, or saved.
- Crop Info Labels (v2.1) -- The public editor displays crop ratio labels below media thumbnails so collaborators know how their images will be processed.
- Upload Progress Overlay (v2.1) -- A fullscreen overlay with a clear message prevents users from closing the page while files are being uploaded.
Admin Review
New in v2.0.
After a collaborator submits changes through a sharing session, administrators can review edits with a field-by-field diff comparison. The diff view only shows actually changed fields (crop metadata is excluded when unchanged). Approving a session automatically invalidates the API cache for the affected table.
Bulk Actions
New in v2.0.
Perform mass operations on tables from the admin panel, including bulk delete, publish all records, and set all records to draft.
Filter Builder
New in v2.0, expanded in v2.1.
A universal filter component used across schemas and sharing sessions. Build filter rules visually in the admin interface to pre-configure which records are exposed through a given schema or session. Filters are applied server-side at the schema level -- the public API does not accept dynamic filter query parameters.
Supported operators:
| Operator | Description |
|---|---|
equals |
Exact match |
not_equals |
Excludes exact match |
contains |
Substring match |
not_contains |
Excludes substring match |
greater_than |
Greater than (numeric/date fields) |
greater_than_or_equal |
Greater than or equal |
less_than |
Less than (numeric/date fields) |
less_than_or_equal |
Less than or equal |
is_empty |
Field is empty or null |
is_not_empty |
Field has a value |
in |
Value is one of a set |
not_in |
Value is not one of a set |
Diagnostics
The built-in diagnostics panel provides system information, database status, and a debug log viewer to help with troubleshooting.
REST API Reference
All endpoints use the namespace kodeleon-tables/v1.
Public Endpoints
These endpoints require no authentication:
GET /wp-json/kodeleon-tables/v1/{table-slug}/records
GET /wp-json/kodeleon-tables/v1/{table-slug}/records/{id}
GET /wp-json/kodeleon-tables/v1/{table-slug}/config
| Endpoint | Description |
|---|---|
GET .../records |
List records with pagination; filters are applied from the selected schema |
GET .../records/{id} |
Retrieve a single record by ID |
GET .../config |
Retrieve table configuration (field definitions, available schemas) |
Query Parameters
Parameters accepted by the GET .../records endpoint:
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
int | 1 |
Page number |
per_page |
int | 20 |
Records per page (max: 100) |
schema |
string | full |
Named schema to shape the response |
order_by |
string | -- | Field key to sort by |
order |
string | -- | Sort direction: ASC or DESC |
Response Format
List response (GET .../records):
{
"table": "products",
"schema": "full",
"page": 1,
"per_page": 20,
"total": 50,
"total_pages": 3,
"items": [
{
"id": 1,
"field_key": "value",
"media_field": {
"id": 42,
"url": "https://example.com/wp-content/uploads/image.jpg",
"sizes": {
"thumbnail": { "url": "...", "width": 150, "height": 150 },
"medium": { "url": "...", "width": 300, "height": 200 }
}
}
}
]
}
Single record response (GET .../records/{id}):
{
"table": "products",
"schema": "full",
"item": {
"id": 1,
"field_key": "value"
}
}
Multi-ratio media response (when configured in schema):
{
"media_field": {
"id": 42,
"ratios": {
"16:9": {
"sizes": {
"medium": { "url": "...", "width": 600, "height": 338 },
"large": { "url": "...", "width": 1200, "height": 675 }
},
"srcset": "...600w, ...1200w"
},
"1:1": {
"sizes": {
"medium": { "url": "...", "width": 600, "height": 600 }
},
"srcset": "...600w"
}
}
}
}
Authorized Endpoints
These endpoints require a valid WordPress user session or application password with the appropriate capability:
GET /wp-json/kodeleon-tables/v1/{table-slug}/records/export
POST /wp-json/kodeleon-tables/v1/{table-slug}/records/import
| Endpoint | Description |
|---|---|
GET .../records/export |
Export all records from the table |
POST .../records/import |
Import records (supports append, upsert, replace modes) |
Session Endpoints
Endpoints for managing and interacting with sharing sessions:
Public (token-based auth):
GET /wp-json/kodeleon-tables/v1/sessions/{token}/data
POST /wp-json/kodeleon-tables/v1/sessions/{token}/save
POST /wp-json/kodeleon-tables/v1/sessions/{token}/upload
Token is a 32-character hex string (e.g. 5a7de02c2e79840e790c80eb26825d75).
Admin-only:
POST /wp-json/kodeleon-tables/v1/sessions/generate
POST /wp-json/kodeleon-tables/v1/sessions/{id}/approve
DELETE /wp-json/kodeleon-tables/v1/sessions/{id}
GET /wp-json/kodeleon-tables/v1/sessions/{id}/payload
| Endpoint | Auth | Description |
|---|---|---|
GET .../sessions/{token}/data |
Token | Retrieve session data and records |
POST .../sessions/{token}/save |
Token | Save record changes within the session |
POST .../sessions/{token}/upload |
Token | Upload media files within the session |
POST .../sessions/generate |
Admin | Generate a new sharing session |
POST .../sessions/{id}/approve |
Admin | Approve changes submitted through a session |
DELETE .../sessions/{id} |
Admin | Delete a session |
GET .../sessions/{id}/payload |
Admin | Retrieve session payload for diff review |
Configuration
Capabilities
Kodeleon Tables uses three granular WordPress capabilities for role-based access control:
| Capability | Description |
|---|---|
kt_admin |
Full access: create/delete tables, manage settings, approve session changes |
kt_records_manage |
Create, edit, and delete records within existing tables |
kt_group_settings_manage |
Manage plugin settings and diagnostics |
Assign these capabilities to custom roles or existing WordPress roles as needed.
Media Settings
Media processing is configured at the field level:
- Aspect Ratios -- Add one or more crop ratios (e.g., 16:9, 4:3, 1:1) to any
mediafield. - WebP Conversion -- Toggle per field; when enabled, a
.webpvariant is generated alongside each crop. - Size Presets -- Define named presets (thumbnail, small, medium, large, full) with target dimensions. Crops are generated and cached in
wp-content/uploads/kt-crops/.
Changelog
v2.1.1
- Fixed critical PHP error on the session review page.
- Fixed false crop data changes appearing in session diff when only other fields were modified.
- Fixed session renewal generating incompatible tokens and malformed URLs.
- Fixed incorrect created/updated counts in session approval message.
- Added fullscreen upload progress overlay in the public editor to prevent premature page closure.
- Added "Remove photo" button for newly selected (not yet uploaded) files in the public editor.
- Deferred media upload: files are no longer uploaded to WordPress until the user clicks Save.
- Crop info labels displayed in the public editor below media thumbnails.
- API cache is automatically invalidated when a session is approved.
v2.1.0
- Universal Filter Builder with grouped AND/OR logic and additional operators (
greater_than_or_equal,less_than_or_equal,in,not_in). - Session rewrite rules optimization.
- Snapshot endpoint removed.
- Filters are now applied exclusively from schema configuration (dynamic API filter parameters removed).
v2.0.0
- Multi-ratio srcset support for media fields in API schemas.
- Schema-level filter configuration via the Filter Builder.
- Sharing session configuration: control visible/editable fields, header field, sorting, and filters.
- Admin review with field-by-field diff comparison and selective approval.
- Bulk actions on tables (delete, publish all, draft all).
- Session payload review endpoint (
GET /sessions/{id}/payload).
v1.4.0
- Initial public release with dynamic tables, full CRUD, REST API, media handling, and sharing sessions.
License
Kodeleon Tables is proprietary software. All rights reserved.
Unauthorized copying, modification, distribution, or use of this software is strictly prohibited without prior written consent from the author.
Author
Marek Wasyluk -- Kodeleon.pl