Hey people,
is it possible to add custom data when registering a block.
My goal is:
acf_register_block_type([
'name' => 'test',
...
'custom_data' => ['key' => 'value']
]);
and access this custom data when block is rendered in editor:
window.acf.addAction("render_block_preview", function($el, atts){
console.log(atts.custom_data);
});
Can anyone help?
Thanks