Description
Used to opt all of your ACF Blocks into a specific version.
Changelog
- Added in version 6.6
Example
functions.php
function my_custom_function_to_bump_the_block_version( $version, $block ) {
return 3; // Use v3
}
add_filter( 'acf/blocks/default_block_version', 'my_custom_function_to_bump_the_block_version', 10, 2 );
Notes
If you have defined the ‘blockVersion’ specifically in your block.json file, the filter will not override that.
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
- Functions: acf_register_block_type()
- Filters: acf/update_value
- Filters: acf/validate_value
- Filters: acf/register_block_type_args
- Filters: acf/blocks/fields_to_open_in_expanded_editor