跳转到主要内容

acf/blocks/default_expanded_editor_button_text

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.expandedEditorButtonText property in block.json
  • The button is hidden entirely if the block has no fields assigned