Hi,
there is a simple code, that does not save data. Without a condition (custom include function) - everything work as normal.
function myFunction( $meta_box ) {
return true;
}
$meta_boxes[] = [
'title' => 'Test Meta Box',
'post_types' => ['post'],
'include' => [
'custom' => 'myFunction',
],
'fields' => [
[
'id' => 'keys',
'type' => 'key_value'
],
[
'id' => 'groups',
'type' => 'group',
'clone' => true,
'fields' => [
[
'id' => 'group-title',
'type' => 'text'
],
[
'id' => 'group-description',
'type' => 'wysiwyg',
'options' => [
'textarea_rows' => 10,
'media_buttons' => false,
'tinymce' => false,
'quicktags' => false
]
]
]
]
]
];