Description
This filter allows developers to modify the array of field types that, when utilized within an ACF block’s inline toolbar, will trigger the expanded editor interface upon interaction. By default, Repeater and Flexible Content fields open in the expanded editor.
Changelog
- Added in version 6.7.
Parameters
apply_filters( 'acf/blocks/fields_to_open_in_expanded_editor', $field_types );
$field_types(array) An array of field type names.
Return
(array) The filtered array of field type names.
Example
This example demonstrates how to add the Group field type to the list of fields that open in the expanded editor, alongside the default Repeater and Flexible Content types.
<?php
/**
* Adds the 'group' field type to the list of fields that open in the expanded editor.
*
* @param array $field_types An array of field type names.
* @return array
*/
function my_acf_add_group_to_expanded_editor( $field_types ) {
$field_types[] = 'group'; // Add the Group field type.
return $field_types;
}
add_filter( 'acf/blocks/fields_to_open_in_expanded_editor', 'my_acf_add_group_to_expanded_editor' );
Supercharge Your Website With Premium Features Using ACF PRO
Speed up your workflow and unlock features to better develop websites using ACF Blocks and Options Pages, with the Flexible Content, Repeater, Clone, Gallery Fields & More.
Related
- Filters: acf/blocks/fields_needing_wide_popover
- Filters: acf/update_value
- Filters: acf/blocks/top_toolbar_fields
- Filters: acf/update_field
- Filters: acf/load_value