WordPress plugin intelligence profile

LUKDEV Custom Data Tables

Define custom data structures (fields) and manage rows of data exposed through the REST API.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version0.1.0
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.2 · PHP 7.4
Directory statusactive
Last directory update8 Oct 202625d ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records LUKDEV Custom Data Tables version 0.1.0 as active, updated 25d ago and tested up to WordPress 7.1.

Overview

About this plugin

A WordPress plugin for defining custom data structures (sets of fields) and managing rows of data for them in the admin. The data is exposed through a public, read-only REST API, so a headless front end can use it.

Think of it as a small, standalone alternative to ACF options pages and repeaters. Each structure is a list of rows, stored in its own database tables instead of post meta.

Author: LUKDEV. Text domain: lukdev-custom-data-tables.

Requirements

  • WordPress 6.2+ (queries use the %i identifier placeholder of $wpdb->prepare() )
  • PHP 7.4+

Usage

Go to LUKDEV Custom Data Tables in the admin menu. You need the manage_options capability.

  • Create a structure. Give it a name and, optionally, a slug (the name is used when the slug is empty). Then add fields. A field’s key is generated from its label, for example Hero title becomes hero_title. Keys must be unique within a structure.
  • Add rows. After you save the structure, the rows editor opens. Rows are saved one at a time, can be moved up or down, and can be deleted.
  • Fetch the data from the REST API (see below).

Deleting a structure also deletes all its rows.

Field types

Each type is listed with its settings, the value stored in the database and the value returned by the API.

  • text: no settings. Stored: string. API: string.
  • textarea: no settings. Stored: string. API: string.
  • wysiwyg: no settings. Stored: HTML ( wp_kses_post ). API: string.
  • number: no settings. Stored: numeric string. API: string.
  • email: no settings. Stored: string. API: string.
  • url: no settings. Stored: string. API: string.
  • boolean: no settings. Stored: "1" / "0". API: true / false.
  • select: settings: options, default. Stored: option value. API: string.
  • radio: settings: options, default. Stored: option value. API: string.
  • checkbox: settings: options, defaults. Stored: list of option values. API: array of strings.
  • image: no settings. Stored: attachment ID. API: image object or null.
  • color_picker: settings: default, opacity, return format ( string / array ). Stored: #rrggbb or rgba(r,g,b,a). API: string, or { red, green, blue, alpha }.
  • date_picker: settings: display format, return format, first day of week. Stored: Ymd. API: date in the return format.
  • post_object: settings: post types, multiple. Stored: post ID or list of IDs. API: post object, null, or array of posts.
  • relationship: settings: post types, filters (search / post type / taxonomy), max. Stored: list of post IDs. API: array of posts.
  • link: no settings. Stored: { page, url, title, target }. API: { title, url, target } or null.
  • repeater: settings: sub-fields. Stored: list of items. API: array of objects.

Notes:

  • Options: an option without a value uses its label as the value, and the other way round.
  • Repeaters can’t be nested. A repeater added as a sub-field is saved as text.
  • Post object and relationship fields accept any public post type (except attachments) when no post types are selected. The API returns published posts only. Drafts and private posts picked in the admin are left out.
  • Link fields point to either a page or a custom URL. The page wins if both are set. The page’s title is used when the link text is empty.
  • Date picker fields use PHP date formats. The default for both display and return is d/m/Y.
  • Changing a field’s type or settings keeps saved data where possible. For example, a single post object becomes a list when multiple is turned on, and a select value becomes a one-item checkbox list. Fields saved before field types existed are treated as textarea.

REST API

Both endpoints are public (no authentication) and read-only.

GET /wp-json/ldcdt/v1/data

Lists all structures.

com/wp-json/ldcdt/v1/data/team" } ]

GET /wp-json/ldcdt/v1/data/{slug}

Returns one structure with its rows, in the order set in the admin. Each item has an id plus one property per field key. Returns 404 ( ldcdt_not_found ) for an unknown slug.

{ "name": "Team", "slug": "team", "fields": [... ", "width": 150, "height": 150 } } } } ] }

Shapes of the other object values:

  • Post ( post_object, relationship ): { id, type, slug, title, url, date }, where date is an ISO 8601 GMT date.
  • Link: { title, url, target }, where target is "" or "_blank".

Project structure

0 (MIT)<h3>Extending</h3>

– To add a field type, register it in ldcdt_field_types(). js.

– Everything uses the ldcdt prefix: functions ( ldcdt_ ), constants ( LDCDT_ ), tables, options, the REST namespace, CSS classes and JS. Sites upgraded from Custom Headless Data (old chd / chdata prefixes) have their tables and option renamed automatically. Admin form actions are ldcdt_save_structure, ldcdt_delete_structure, ldcdt_save_row, ldcdt_delete_row and ldcdt_move_row.

The post search AJAX action is ldcdt_search_posts.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • custom fields
  • rest api
  • data
  • headless
  • repeater
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.2 · PHP 7.4
Update activity8 Oct 202625d ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.