Working with repeater fields

By default, the plugin ignores repeater fields allowing their data to pass through to ACF for storage in core metatables. This is to maintain consistency after updating to version 1.1. You may enable repeater support using either the plugin’s settings panel, or a WordPress filter and then further configure the plugin — using WordPress filters […]

Phil Kurth Phil Kurth

Caveats and Gotchas

If choosing to bypass core meta tables, you may face issues with third party systems that rely on WordPress’ core table structure (e.g; search plugins, database management plugins, etc.) If you find situations where this is a problem, please let us know so that we can investigate solutions. If a table definition does not contain […]

Want it delivered fresh? You know what to do…

We never share your data.
Read our Privacy Policy

Removing support for fields

You can remove fields from the supported field list, if you need to. When doing so, you have the ACF field array to evaluate, so you have a good degree of flexibility: * Removing fields from the ‘supported fields’ list. This affects table definition * generation and can go in your functions.php file or a […]

Running custom actions after a table is updated or created

As of version 1.1, it is possible to run custom handlers during the table update process. The ability to run processes right after schema update opens up a number of possibilities including: Custom index creation. Custom logging/notification. Custom data migration handlers. Table field format modifications that might not be possible due to limitations in WordPress’ […]

Running custom actions after a table value is updated

You may use the acfcdt/custom_table_value_updated action hook to run custom functionality after a field value has been saved in a custom database table. A common use case could be to delete core meta table values as they are saved in a custom table. e.g; add_action( ‘acfcdt/custom_table_value_updated’, function ( $value, $post_id, $field_array ) { // Delete […]

Overriding default field value encode and decode behaviours

When storing a value in a database table, the value cannot be an array or object as these will result in database errors. To protect against this, WordPress’ core meta system attempts to serialize all values before storing them in the core tables. This allows us to pass non-scalar values (arrays, objects) to functions such […]

Preventing deletion of custom table data

By default, the plugin will intercept calls made to delete posts and remove all custom table data when the post is removed from the database. Note: Moving a post to the trash does not trigger data removal from custom database tables. This only occurs when the post is removed permanently from the database via the […]

Empty value handling

When deleting a field value from a custom database table — either by passing an empty value to update_field() or by invoking delete_field() — the data type must be considered to ensure the table column receives the correct ’empty’ value. This is especially true when controlling column data types for maximum efficiency. For example, a […]

Filtering values before insertion

You may use the acfcdt/filter_value_before_update filter to modify values before they are stored in custom database tables. The filter runs after ACF’s core acf/update_value filter and does not affect values stored in core meta tables — this purely provides a way to manipulate data stored in custom tables only. If you need to modify data […]

Globally activate sub tables

It is possible to set a global setting that will enable sub tables on all eligible fields. At the time of writing, the only fields eligible for sub tables are repeaters. We don’t recommend this as you will have a very large number of database tables but, if you need to, you can use the […]

Good dev stuff, delivered.

Product news, tips, and other cool things we make.

We never share your data. Read our Privacy Policy

© 2016 – 2024 Hookturn Digital. All rights reserved.