That’s a good question! Thanks for asking!
Basically migrating to Meta Box isn’t hard. If you save a value in a single row in the post meta table, then you just need to register a field with id = meta key, that’s all.
To understand how meta value is saved in Meta Box, please read this docs:
https://metabox.io/docs/how-post-meta-is-saved-in-the-database/
Best regards
Thanks for reply !
So if I understand, I must refer to the old field’s id to create the meta box.
Like this :
// 1st meta box
$meta_boxes[] = array(
'id' => 'personal',
...
'fields' => array(
array(
'name' => __( 'Full name', 'textdomain' ),
'id' => $prefix . 'id_of_my_old_field',
'type' => 'text'
),
)
);
That’s right. Just a note: $prefix . ‘id_of_my_old_field’ = ‘your old field id’.