Transition from (classical) serialized custom meta field to (gutenberg) rest enabled meta
Here’s an answer to question 1 that uses register_post_meta. It’s also the start of an answer to question 2 by use of the prepare_callback option in show_in_rest . add_action( ‘init’, ‘wpse_89033_register_custom_meta’ ); function wpse_89033_register_custom_meta() { $post_types = [ ‘post’, ‘page’, ‘attachment’, ]; foreach ( $post_types as $post_type ) { register_post_meta( $post_type, ‘_custom_key’, array( ‘type’ => … Read more