acf/blocks/default_expanded_editor_button_text filter-hookACF 6.8.0

Filters the default expanded editor button text for blocks.

This filter provides a global default for the "Open Expanded Editor" button text. The block.json expandedEditorButtonText setting takes precedence over this filter.

Usage

add_filter( 'acf/blocks/default_expanded_editor_button_text', 'wp_kama_acf_blocks_default_expanded_editor_button_text_filter', 10, 2 );

/**
 * Function for `acf/blocks/default_expanded_editor_button_text` filter-hook.
 * 
 * @param string $button_text The default button text. Empty string uses "Open Expanded Editor"
 *                            translation.
 * @param array  $block       The block configuration array.
 *
 * @return string
 */
function wp_kama_acf_blocks_default_expanded_editor_button_text_filter( $button_text, $block ){
	// filter...
	return $button_text;
}
$button_text(string)
The default button text. Empty string uses "Open Expanded Editor" translation.
$block(array)
The block configuration array.

Changelog

Since 6.8.0 Introduced.

Where the hook is called

acf_enqueue_block_assets()
acf/blocks/default_expanded_editor_button_text
acf/pro/blocks.php 1242
$default_text = apply_filters( 'acf/blocks/default_expanded_editor_button_text', '', $block );

Where the hook is used in Advanced Custom Fields PRO

Usage not found.