﻿=== Recast Table Builder for ACF and SCF ===
Contributors: recastdigital
Tags: acf, advanced custom field, scf, secure custom fields, table
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.12
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a Table field for ACF and SCF to create editable custom data tables with rows and columns directly in WordPress.

== Description ==

Recast Table Builder for Advanced Custom Fields and Secure Custom Fields adds a dedicated `Table` field type for `Advanced Custom Fields (ACF)` and `Secure Custom Fields (SCF)`.

Use it to build structured, editable custom data tables directly in the WordPress admin.

Features include:

* Add and remove table rows and columns.
* Use text cells in the field UI.
* Store the full table structure in one ACF/SCF field value.
* Works with existing ACF and SCF field group workflows.

This plugin requires Advanced Custom Fields or Secure Custom Fields to be installed and active.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/recast-table-builder-for-acf-scf` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the `Plugins` screen in WordPress.
3. Make sure Advanced Custom Fields or Secure Custom Fields is installed and active.
4. Add the `Table` field type to a field group.

== Usage ==

1. Create or edit an `ACF` or `SCF` field group.
2. Add a new field and choose the `Table` field type.
3. Assign the field group to the post type, page, options page, or block where you want to use it.
4. Edit your content and add table headers, rows, and cell values in the `Recast Table Builder for Advanced Custom Fields and Secure Custom Fields` UI.
5. Save or update the post.

To render the saved table on the front end, fetch the field value with `get_field()` and pass it to `recast_stf_render()`:

`$table = get_field( 'my_table' );`

`if ( $table ) { echo recast_stf_render( $table ); }`




== Styling ==

Recast Table Builder for Advanced Custom Fields and Secure Custom Fields` outputs a small set of default classes:

* `.recast-table-builder-for-acf-scf-front`
* `.recast-table-builder-for-acf-scf-front__table`
* `.recast-table-builder-for-acf-scf-front__head`
* `.recast-table-builder-for-acf-scf-front__body`
* `.recast-table-builder-for-acf-scf-front__row`
* `.recast-table-builder-for-acf-scf-front__heading`
* `.recast-table-builder-for-acf-scf-front__cell`

You can style those classes directly with `CSS`.


== Frequently Asked Questions ==

= Does this plugin require Advanced Custom Fields or Secure Custom Fields? =

Yes. `Recast Table Builder for Advanced Custom Fields and Secure Custom Fields` extends the `ACF`/`SCF` field API and requires `Advanced Custom Fields` or `Secure Custom Fields` to be active.

= Is this an ACF table field plugin? =

Yes. This plugin adds a dedicated `Table` field type you can use as an `ACF table field`.

= Does this work as a Secure Custom Fields table field? =

Yes. The same `Table` field type works in `Secure Custom Fields (SCF)` field groups.

= Which cell types are supported? =

The plugin supports `text` cells.

= How do I display the table in my theme? =

Use `get_field()` to retrieve the saved value and pass it to `recast_stf_render()`, for example:

`$table = get_field( 'my_table' );`

`if ( $table ) { echo recast_stf_render( $table ); }`

= Which PHP versions are supported? =

The plugin targets PHP 7.4 and newer. That matches the current minimum PHP version required by current releases of both Advanced Custom Fields and Secure Custom Fields.

== Screenshots ==

1. Editing headers, rows, and cell values in the ACF/SCF table field UI.
2. Adding the `Table` field type to an Advanced Custom Fields or Secure Custom Fields field group.

== Changelog ==

= 1.1.12 =

* Prepared first public WordPress.org SVN release and synchronized versioning with current approved plugin naming and packaging.

= 1.1.10 =

* Renamed the plugin to Recast Table Builder for Advanced Custom Fields and Secure Custom Fields.
* Updated slug and text domain to `recast-table-builder-for-acf-scf`.
* Standardized internal declarations with the `recast_stf_` prefix to reduce collisions.

= 1.1.9 =

* Added per-field runtime config support so add-ons can control Recast Table Builder for Advanced Custom Fields and Secure Custom Fields features on a field-by-field basis.
* Updated the admin table UI to respect field-specific enabled cell types instead of only global plugin availability.

= 1.1.8 =

* Fixed WYSIWYG table-value decoding so formatted content with quoted HTML attributes does not corrupt the saved table JSON.
* Tightened table-grid selectors and admin asset cache busting so WYSIWYG testing behaves more reliably in the editor.

= 1.1.7 =

* Added compatibility handling for Pro basic WYSIWYG cells so saved formatted content is preserved and previewed safely when those cells are unavailable.
* Added shared table support for initializing and rendering add-on WYSIWYG cells safely inside the admin UI.

= 1.1.6 =

* Added compatibility handling for Pro image cells so saved image data is preserved and previewed safely when those cells are unavailable.
* Allowed attachment-based image fields to initialize cleanly in the shared table UI for add-ons such as Recast Table Builder for Advanced Custom Fields and Secure Custom Fields Pro.

= 1.1.5 =

* Refactored the free plugin into clearer modules for environment checks, dependencies, assets, values, rendering, and compatibility helpers.
* Split free core cell types from compatibility-only fallback cell types so optional Pro features are preserved without being treated as free features.
* Tightened rendered HTML allowlists to keep text and preview output safer while preserving readable locked previews for unavailable cell types.

= 1.1.4 =

* Preserved file and link rendering when those cell types are unavailable and replaced locked admin warning boxes with muted saved-value previews.

= 1.1.3 =

* Added a save-preparation hook so optional add-ons can resolve dynamic uploads before the table JSON is normalized.

= 1.1.2 =

* Fixed dynamic additional field templates so ACF-managed field types get unique keys and names per cell.

= 1.1.1 =

* Moved optional cell implementations out of the free plugin so unavailable features cannot be enabled by a simple flag change.

= 1.1.0 =

* Split the plugin architecture into a core plugin and add-on-ready cell type registry.
* Kept text cells in the plugin and locked unsupported cells safely when those cell types are unavailable.
* Added extension hooks so add-ons can enable extra cell types without replacing the main field.

= 1.0.8 =

* Tightened dependency detection so the missing ACF or SCF notice appears only when a supported plugin is actually active.

= 1.0.7 =

* Renamed the plugin from Recast ACF Table to Recast Table Builder for Advanced Custom Fields and Secure Custom Fields.
* Updated the internal text domain and helper names to match the new brand.

= 1.0.6 =

* Documented first-class support for Secure Custom Fields.
* Updated dependency checks and admin notices to recognize either ACF or SCF.

= 1.0.5 =

* Added a front-end rendering helper for saved table values.

= 1.0.4 =

* Added runtime compatibility guards for WordPress and PHP versions.
* Replaced a PHP-only unique ID call with the WordPress helper for better long-term compatibility.
* Added a repeatable PHP compatibility check for PHP 7.4 through current PHP 8.x releases.

= 1.0.3 =

* Prepared the plugin for WordPress.org distribution.
* Added a standard WordPress.org readme.
* Updated plugin metadata, licensing, and translation setup.
* Added an admin notice when Advanced Custom Fields is missing.
* Normalized and sanitized stored table data before saving.
* Improved admin-side field scripts and CSS for more reliable behavior.

== Upgrade Notice ==

= 1.1.8 =

Fixes WYSIWYG save reliability for formatted content and improves admin asset cache busting during editing.


