Add a drop-down selection meta field to the custom post type – restAPI seems to be bothering

I have a custom post type, name it topic, It's from BBPress, but this is not a BBPress question.

I also have a post type lessontopic,

I've added a meta-box to BBPress so I can select an appropriate topic topic for the forum topic when I'm in the backend editor for BBPress topics post meta data,

I have done the following:

add_action( 'add_meta_boxes', 'ld_bbpress_display_ldtopic_selector');

function ld_bbpress_display_ldtopic_selector() {
    add_meta_box( 'ld_bbpress_ldtopic_selector', __( 'LearnDash bbPress Settings', 'learndash-bbpress' ), 'ld_bbpress_display_topic_selector_callback', 'topic', 'advanced', 'high' );

function ld_bbpress_display_topic_selector_callback() {
   My call back stuff

add_action( 'save_post_topic', 'ld_save_associated_ldtopic',10,1);
function ld_save_associated_ldtopic($topic_id){
    if ( ! wp_verify_nonce( $_POST('ld_bbpress_nonce_ldtopic'), 'ld_bbpress_meta_box_ldtopic' ) ) {
    my save stuff

Now everything looks fine in the backend. However, if I select a lesson topic from my meta-dropdown list and click "Update" and work through it in my debugger, the update will be executed in


This has to do with the fact that for a custom block that allowed me to select forum topics, I had to enable the display of BBPress topics in restAPI, and the backend editor mysteriously encountered the restAPI update endpoint. I have activated the restAPI over

add_filter( 'bbp_register_topic_post_type', 'enable_restAPI_bbpress_topics', 10,1);
function enable_restAPI_bbpress_topics ($args) {
    $args('show_in_rest') = true;
    $args('supports') = array( 'title', 'editor', 'author', 'thumbnail', 'excerpt' );
    return $args;

But I do not understand, why just checking that a post type for restAPI is visible causes the wordpress backend editor to go into a completely different operating mode? I mean, we're talking about the backend. When I activate restAPI, I can see how headless CMS, etc. should facilitate this, but why does it change as radically as WordPress handles post-processing in the backend?

Somehow this leads to my save hook ld_save_associated_ldtopic not see that $_POST Array and therefore no nonce data.

Really strange. I feel like violating a rule and it bites me, but I'm not sure what to do to make my meta-box work that way.


Many thanks,