*/ public function requirements(): array; /** * Validates the description for a new entry of $postType. Nothing is written. * * @param list $sections * @return WP_Error|null Every problem of the description; null = valid. */ public function check(string $postType, array $sections): ?WP_Error; /** * Composes the description for the new draft $postId and stores it. A WP_Error means the * description is invalid for this entry (nothing was written) – like a throw, it makes * lit/content-create delete the draft again. * * @param list $sections * @return array{warnings: list, outline: ?string, edit_url?: string}|WP_Error edit_url: where * the new content is edited (e.g. the Divi builder) instead of the WordPress editor. * @throws Throwable When storing failed. */ public function write(int $postId, string $postType, array $sections): array|WP_Error; }