I'm making a block with MB Blocks. I'm having trouble with the callback. here's my callback:
function hba_hours( $attributes ) {
// Fields's data.
if ( empty( $attributes['data'] ) ) {
return;
}
$prefix = 'hba_blocks_';
$title = $attributes( $prefix . 'hours_title' );
$hours = $attributes( $prefix . 'hours' );
echo '<h4>' . $title . '</h4>';
return '<p>' . $hours . '</p>';
}
I get a 500 that starts with this:
<b>Fatal error</b>: Uncaught Error: Array callback must have exactly two elements in /home/customer/www/heartsideb.sg-host.com/public_html/wp-content/plugins/heartside-blocks/heartside-blocks.php:74
Stack trace:
#0 [internal function]: hba_hours(Array)
I don't even know what question to ask here. What's wrong?