$date ) );
}
if ( isset( $_POST[ self::CATEGORY_FIELD ] ) ) {
// Allowed on a queued topic, unlike the author: create-draft resolves the category
// when the draft is delivered, so a change made mid-generation still lands on the
// article rather than being lost (MMBC-113).
update_post_meta(
$post_id,
SWCC_Topic::META_CATEGORY,
SWCC_Topic::sanitize_category( sanitize_text_field( wp_unslash( $_POST[ self::CATEGORY_FIELD ] ) ) )
);
}
if ( isset( $_POST[ self::AUTHOR_FIELD ] ) ) {
$author = absint( wp_unslash( $_POST[ self::AUTHOR_FIELD ] ) );
// A queued topic refuses the change, here as everywhere else (MMBC-108): the delivery
// already on its way is credited to the author it was queued with. set_author()
// enforces that itself, so this only has to avoid treating the refusal as a failure.
if ( $author > 0 ) {
SWCC_Topic::set_author( $post_id, $author );
}
}
// phpcs:enable WordPress.Security.NonceVerification.Missing
}
}