Maintainer overview of the hybrid post/taxonomy model, term-data-store link, and listing filter.
Objects
| Object | Slug | Notes |
|---|---|---|
| Post type | collections | Public, hierarchical, REST-enabled; archive at /collections/ |
| Taxonomy | collection | Public, hierarchical, REST-enabled; no front-end rewrite archives |
Post types that declare prc-collections support (initially post and feature) receive the taxonomy. Extend with add_post_type_support( $type, 'prc-collections' ) or the prc_platform__collections_enabled_post_types filter.
Term data store
On init, the plugin calls \PRC\TDS\add_relationship( 'collections', 'collection', false ). Each collection post maps to a taxonomy term (tds_post_id / tds_term_id). Permalink rewriting from TDS is off; collections own their permalinks.
Meta and Site Editor
| Meta | Type | REST | Purpose |
|---|---|---|---|
kicker_pattern_slug | string | Yes | Slug of the kicker-area template part |
default_wp_template_part_areas adds a kicker area so kickers are managed separately from general template parts.
Publication listing filter
On pre_get_posts (priority 100), when a publication listing query runs on a collections page, the plugin looks up the related term via \PRC\TDS\get_related_term(), injects a tax_query, and excludes the collection post ID from results.
Blocks
Both blocks register from metadata under src/ and render in PHP:
prc-block/collection-kicker— resolves term →kicker_pattern_slug→do_blocks()on the template part; object-cache groupprc_collection_kicker(1 hour)prc-block/fact-sheet-collection— builds hierarchy and language links for fact sheets
Editor panel
prc-platform--collections registers a PluginDocumentSettingPanel only on collections posts. Assets build from includes/inspector-sidebar-panel/.
Key files
| Path | Role |
|---|---|
includes/class-content-type.php | CPT, taxonomy, TDS, meta, query filter |
includes/class-plugin.php | Bootstrap and block load |
src/collection-kicker/ | Kicker block |
src/fact-sheet-collection/ | Fact sheet block |
includes/inspector-sidebar-panel/ | Document settings panel |