%3$s

', esc_attr( self::FIELD ), esc_html__( 'Post as the official response', 'feature-request-system' ), wp_nonce_field( self::NONCE_ACTION, self::NONCE_FIELD, false, false ) ); return $checkbox . $submit_field; } /** * Marks a new comment as official when the checkbox was ticked. * * @param int $comment_id ID of the comment just saved. */ public static function save( int $comment_id ): void { $nonce = isset( $_POST[ self::NONCE_FIELD ] ) ? sanitize_text_field( wp_unslash( $_POST[ self::NONCE_FIELD ] ) ) : ''; if ( empty( $_POST[ self::FIELD ] ) || ! wp_verify_nonce( $nonce, self::NONCE_ACTION ) ) { return; } OfficialResponse::mark( $comment_id, true ); } }