Last active
January 7, 2020 21:23
-
-
Save mishterk/a85918a1290505fe575e7e7cdc1509de to your computer and use it in GitHub Desktop.
How to activate support for a custom field type when using the ACF Custom Database Tables plugin. For more information, see https://support.hookturn.io.test/acf-custom-database-tables/doc/how-to-activate-support-for-a-custom-field-type/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This will register a custom field type as supported by the plugin. | |
// This affects table definition generation and can go in your functions.php | |
// file or a plugin. | |
add_filter( 'acfcdt/is_supported_field', function ( $is_supported, $field ) { | |
if ( $field['type'] === 'custom_acf_field_type' ) { | |
$is_supported = true; | |
} | |
return $is_supported; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment