Skip to content
Corex

PageRecord

Corex\Provisioning\PageRecord · class · Core layer

What a page was before a kit changed it, and what the site’s reading settings were (spec 115, FR-001 and FR-002). A kit apply writes these once, before it replaces or adopts a page; a reset reads them to put the page and the front page back instead of deleting what the owner had. The page’s record lives in its own meta, so it stays with the page whatever happens to the kit’s list of pages. The reading record is a corex_* option, which a reset removes with the kit’s other options once it has used it. This class only shapes the values; the kit writes them and the reset command reads them.

of(WP_Post $page, string $template): array

Section titled “of(WP_Post $page, string $template): array”

The fields of a page a restore puts back.

Whether a stored value is a page record this class wrote.

restoreArgs(int $pageId, array $record): array

Section titled “restoreArgs(int $pageId, array $record): array”

The arguments for wp_update_post() that put a page back as it was recorded. WordPress takes one level of slashes off a title and a content on the way in, so they are slashed here.

Whether a stored value is a reading record this class wrote.