Hide on screen

A new setting has been added to disable the “Block Editor” (Gutenberg) where the field group is being displayed.

Set Settings in PHP

It is possible to set this setting in PHP using the acf/load_field_group hook. Note that this hook is used everywhere, including in ACF admin and tools screen. Which means the setting will be used when exporting the field group.

To avoid that behavior, you can use the acfe_is_admin_screen() function as condition. Usage example:

add_filter('acf/load_field_group', 'my_acf_field_group');
function my_acf_field_group($field_group){
    // Bail early if in ACF admin/tool screen
        return $field_group;
    // Target a specific key
    if($field_group['key'] !== 'group_5f20935b9a777')
        return $field_group;
    // Settings
    $field_group['hide_on_screen'][] = 'block_editor';
    // Return
    return $field_group;

Retrieve Settings

Hide on screen settings are saved in the Field Group array, under hide_on_screen key. It can be retrieved using acf_get_field_group(). Usage example:

$field_group = acf_get_field_group('group_5f20935b9a777');

 * [instruction_placement] => label
 * ...
 * [hide_on_screen] => Array
 * (
 *      [0] => the_content
 *      [1] => block_editor
 * )
 * ...