ACF PRO 5.9 Beta4 is now available for download 🌈☀️! This includes all the highly anticipated updates shown in our ACF 5.9 – Exciting new features announcement.
To access this release, please login to your store account and select this version from the available downloads shown on the Licenses page. Users who already have a beta version installed will find an automatic update available via the Plugins admin page.
👨💻 Please find the release notes below. And for the latest ACF news, follow us on Twitter @wp_acf.
WordPress version 5.5 is just around the corner and will will introduce a bunch of new features for the block editor. One of which is a new toolbar button used to set the “xy” position of content. This button resembles a 3×3 matrix grid, and will be used primarily within the core Cover block type.
We are happy to announce compatibility with this new feature via two new settings for the acf_register_block_type()
function; One to enable the feature, and the other to define its initial value. Here’s a code example to demonstrate these new settings:
<?php
acf_register_block_type( array(
'name' => 'test_align_matrix',
'title' => 'Test Align Matrix',
'align_content' => 'top left', // Specifies the default attribute value.
'supports' => array(
'align_content' => true // Enables the feature.
),
'render_callback' => function( $block ){
echo '<div class="is-position-' . esc_attr( $block['align_content'] ) . '">';
echo '<p>' . esc_html( $block['align_content'] ) . '</p>';
echo '</div>';
}
));
When adding a new block, there is a potential for two individual AJAX requests to be made in order to load the preview and fields HTML (depending on the “mode” setting defined). We’ve combined these multiple calls into a single AJAX request and hope to see performance gains for all users as a result!
A bug was discovered in our <InnerBlocks /> implementation preventing the templateLock
attribute from working as expected. This bug is now fixed, allowing developers to lock down a specific inner blocks layout.
An odd bug has existed for a while causing WYSIWYG fields to become unresponsive when moving a block (in edit mode) using the up and down arrows. We’ve implemented a neat solution to fix the issue and hope no one has been waiting too long for the remedy.
Throughout the development of version 5.9, we have been tweaking the Location system responsible for mapping field groups to object types. One of the reasons for this work is to set the foundation for planned REST API and performance enhancements – which we will discuss in the not to distant future.
We are excited to announce this foundational work is now complete! Expect to see new documentation emerging shortly regarding the ACF_Location
class and how it can be used to define new location rules with only a few lines of code!
do_blocks()
.
🙌 Thanks to everyone who helped make this release possible. Think you’ve found a bug? Please post in detail a new support ticket.
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.