Overview
Customize the default “Open in Expanded Editor” button text for all V3 blocks.
Description
This filter allows you to change the default button text that appears on the “Open in Expanded Editor” button for all ACF Blocks V3. Individual blocks can override this default using the acf.expandedEditorButtonText property in block.json.
Parameters
apply_filters( 'acf/blocks/default_expanded_editor_button_text', $text );
$text
(string) The button text. Default: 'Open in Expanded Editor'
Example
Change the default button text for all blocks
add_filter( 'acf/blocks/default_expanded_editor_button_text', function( $text ) {
return 'Edit Fields';
});
Use a translatable string
add_filter( 'acf/blocks/default_expanded_editor_button_text', function( $text ) {
return __( 'Open Editor', 'my-theme' );
});
Changelog
- Added in version 6.8
Notes
- This filter only applies to ACF Blocks V3
- Individual blocks can override this default via the
acf.expandedEditorButtonTextproperty inblock.json - The button is hidden entirely if the block has no fields assigned
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
- Functions: acf_register_block_type()
- Filters: acf/blocks/default_block_version
- ACF Blocks: ACF Blocks Configuration via block.json