WpEmailStudioStore
Corex\Email\Studio\WpEmailStudioStore · class · Add-ons layer
Private WordPress persistence for Email Studio assets and immutable events. WordPress takes one level of slashes off a post’s title and off a meta value on their way in, so each is handed over with one put on: a record is read back as the text it was given, a path or a CSS escape in it included.
Public API
Section titled “Public API”registerPostType(): void
Section titled “registerPostType(): void”create(string $type, string $slug, string $name, int $parentId, array $payload): int
Section titled “create(string $type, string $slug, string $name, int $parentId, array $payload): int”update(int $id, string $name, array $payload): bool
Section titled “update(int $id, string $name, array $payload): bool”find(int $id): ?array
Section titled “find(int $id): ?array”forgetAttempt(string $attemptId): int
Section titled “forgetAttempt(string $attemptId): int”pruneOlderThan(string $type, DateTimeImmutable $cutoff, int $limit): int
Section titled “pruneOlderThan(string $type, DateTimeImmutable $cutoff, int $limit): int”findBySlug(string $type, string $slug): ?array
Section titled “findBySlug(string $type, string $slug): ?array”all(string $type, ?int $parentId): array
Section titled “all(string $type, ?int $parentId): array”latest(string $type, int $limit): array
Section titled “latest(string $type, int $limit): array”Read newest first. all() reads the first 500 a kind ever had, which is every record on most sites and, on a busy one, none of the recent ones.