ACF Table Field Pro Add-on Docs Last updated:

Parent sources

On this page

Since version: v1.8.0

Release Candidate 1.8.0-RC1

This page documents version 1.8.0, which is available as Release Candidate 1.8.0-RC1 for manual installation. The current public version is 1.7.6, automatic plugin updates still deliver that version.

Download the Release Candidate from your account (Download the plugin) and install it manually (Install the plugin). Details may still change until the final release.

Filter acf_tablefield/abilities/show_in_rest

New since version 1.8.0

This filter is new.

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 );
    • $show
    • (bool)
    • Whether 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_name
    • (string)
    • The full name of the ability, e.g. acf-tablefield-pro/add-row.

Previous and Next Sources

Parent sources