ACF Extended adds a new layer of display control for Fields. You can choose which roles can see the Field in the “Post Edit” screen. By default none are selected, which means all roles can interact with it.
In order to enable the Field Permissions settings, you must enable the Field Group: Advanced Settings feature.
Keep in mind that once activated, the Field Permissions will totally remove the Field from the “Post Edit” screen for the unselected roles. That means the field won’t be submitted & processed during submissions actions like acf/save_post
or acf/update_value
.
Select user roles that are allowed to view and edit this field
Permissions settings are saved in the Field array, under acfe_permissions
key. It can be retrieved using acf_get_field()
. Usage example:
$field = acf_get_field('field_5f3b18f71b658');
/*
* [required] =>
* [instructions] =>
* ...
* [acfe_permissions] => Array
* (
* [0] => administrator
* [1] => editor
* )
* ...
*/