Hi Guys,
Just done a fresh install of WordPress 5.0.3 and ACF PRO 5.7.11. and the ACF plugin doesn’t contain “acf_register_block” (used search directory in atom)
Here is my test to create a block which doesn’t pass the function exists if statement
function my_acf_init() {
// check function exists
if( ! function_exists('acf_register_block') )
return;
// register a full width banner block
acf_register_block(array(
'name' => 'full-width-banner',
'title' => __('Full Width Banner'),
'description' => __('A full width banner with Title, Introduction, Background Image And Link'),
'render_template' => 'templates/page/blocks/full-width-banner-block.php',
'category' => 'formatting',
'mode' => 'preview',
'icon' => 'admin-comments',
'keywords' => array( 'banner'),
));
}
add_action('acf/init', 'my_acf_init');
Ignore me i wasn’t using the Beta Version
The documentation still indicates that the function has been available since 5.0.0 – that is confusing and should be amended.