Since version: v1.8.0
Filter acf_tablefield/abilities/show_in_rest
This filter decides per ability whether it is shown in the Abilities REST API (/wp-abilities/v1/). It does not change the REST API support of the table field. When it returns false, the ability is left out of the list and its endpoints return 404 rest_ability_not_found. The default comes from the setting Enable Table Field Abilities in the WordPress Abilities REST API in the plugin settings (tab Features), which is off by default, see Enable the abilities. The filter runs at priority 10 and overrides the setting per ability, so use a priority greater than 5. The filter runs when the abilities are registered, so add it in the functions.php of a theme or in a plugin. It sets the meta show_in_rest of the ability. To hide the abilities from MCP only, use the filter abilities/mcp_public.
Parameters
add_filter( 'acf_tablefield/abilities/show_in_rest', function( $show, $ability_name ) {
// hide one ability from the Abilities REST API
if ( 'acf-tablefield-pro/get-table-data' === $ability_name ) {
return false;
}
return $show;
}, 10, 2 );
-
$showWhether the ability is shown in the Abilities REST API. Default: the setting Enable Table Field Abilities in the WordPress Abilities REST API, off by default.
-
$ability_nameThe full name of the ability, e.g.
acf-tablefield-pro/add-row.