Description
This filter allows developers to modify the list of ACF field types that will receive a wider popover when used within an ACF Block with toolbar inline editing. This is particularly useful for fields with more complex user interfaces that require additional horizontal space.
By default, the gallery, relationship, wysiwyg, and google_map fields are configured to use a wide popover.
Changelog
- Added in version 6.7
Parameters
$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 'taxonomy' field type to the list of fields that should receive a wide popover.
<?php
/**
* Adds the 'taxonomy' field to the list of fields needing a wide popover.
*
* @param array $field_types An array of field type names.
* @return array
*/
function my_acf_add_taxonomy_to_wide_popover( $field_types ) {
$field_types[] = 'taxonomy'; // Add the 'taxonomy' field type.
return $field_types;
}
add_filter( 'acf/blocks/fields_needing_wide_popover', 'my_acf_add_taxonomy_to_wide_popover' );
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_to_open_in_expanded_editor
- Filters: acf/blocks/top_toolbar_fields
- Filters: acf/update_field
- Filters: acf/load_field
- Filters: acf/prepare_field