=== Recast Table Builder for Advanced Custom Fields and Secure Custom Fields === Contributors: recastdigital Tags: acf, custom fields, table, field type 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 Adds a customizable table field type for Advanced Custom Fields and Secure Custom Fields with dynamic rows and columns. == Description == Recast Table Builder for Advanced Custom Fields and Secure Custom Fields adds a custom field type for Advanced Custom Fields and Secure Custom Fields that lets editors build structured tables directly inside the WordPress admin area. Features include: * Add and remove rows and columns from the field UI. * Use text cells in the field UI. * Keep saved unsupported cells intact even if they are unavailable for editing. * Store the table structure in a single ACF field value. * Works with existing Advanced Custom Fields and Secure Custom Fields editing 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 the built-in helper `recast_stf_render()`: If your table field is stored on an options page, pass `option` as the second argument to `get_field()`: == Styling Examples == `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`. = Example with CSS = .recast-table-builder-for-acf-scf-front { overflow-x: auto; margin-top: 1.5rem; } .recast-table-builder-for-acf-scf-front__table { width: 100%; border-collapse: collapse; background: #ffffff; border: 1px solid #d9dee5; border-radius: 14px; overflow: hidden; } .recast-table-builder-for-acf-scf-front__heading, .recast-table-builder-for-acf-scf-front__cell { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid #e7ebf0; } .recast-table-builder-for-acf-scf-front__heading { background: #f5f7fa; font-weight: 700; color: #1f2937; } .recast-table-builder-for-acf-scf-front__cell { color: #334155; } .recast-table-builder-for-acf-scf-front__row:last-child .recast-table-builder-for-acf-scf-front__cell { border-bottom: 0; } .recast-table-builder-for-acf-scf-front__cell a { color: #0f5a78; text-decoration: underline; } == 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. = Which cell types are supported? = The plugin supports `text` cells. Saved unsupported cell types are preserved safely. = 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: = 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 table headers, rows, and cell values in the `Recast Table Builder for Advanced Custom Fields and Secure Custom Fields` field UI. 2. Adding a `Table` field to an `ACF` or `SCF` 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. = 1.1.7 = Improves compatibility support for premium WYSIWYG cells while keeping saved formatted content safe when those cells are unavailable. = 1.1.5 = Improves the free plugin foundation with clearer architecture, stricter rendered HTML allowlists, and safer compatibility handling for unavailable cell types. = 1.1.4 = Improves locked unavailable-cell handling and preserves saved file and link rendering when those cell types are unavailable.