nl_tokens: Monitors Gutenberg store for draft ID assignment and transmits it to parent frame when needed .
pl_tokens: function transmitDraftId ( calypsoPort ) { // Bail if we are not writing a new post. if ( ! / wp-admin\/post-new.php / . <mask> ( location . href ) ) { return ; } const unsubscribe = subscribe ( ( ) => { const currentPost = select ( 'core/editor' ) . getCurrentPost ( ) ; if ( currentPost && currentPost . id && currentPost . status !== 'auto-draft' ) { calypsoPort . postMessage ( { action : 'draftIdSet' , payload : { postId : currentPost . id } , } ) ; unsubscribe ( ) ; } } ) ; }