I am trying to make the post type description user editable. While I am able to access the settings-page data via rwmb_meta('_prefix_classic_editor', ['object_type' => 'setting'], 'posttype_description')
inside a template like archive.php, I can't inside my register post types function like so:
function prefix_register_post_types()
{
$cpt_labels = [...];
register_post_type('cpt', [
'label' => esc_html__('cpts', '_textdomain'),
'labels' => $cpt_labels,
'description' => rwmb_meta('prefix_classic_editor', ['object_type' => 'setting'], 'posttype_description'),
'public' => true,
'hierarchical' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'show_in_rest' => true,
'query_var' => true,
'can_export' => true,
'delete_with_user' => true,
'has_archive' => true,
'rest_base' => '',
'show_in_menu' => true,
'menu_icon' => 'dashicons-awards',
'menu_position' => 5,
'capability_type' => 'post',
'supports' => ['title', 'editor', 'thumbnail', 'excerpt'],
'taxonomies' => [],
'rewrite' => [
'with_front' => false,
],
]);
}
add_action('init', 'prefix_register_post_types');
any idea on how to accomplish this?