Bootstrap lives in includes/class-bootstrap.php. Core query logic and the _post_visibility taxonomy live in includes/class-query.php. Editor assets: src/post-visibility/ and src/core-query/.
Concepts
| Term | Meaning |
|---|---|
| Publication listing | Home, taxonomy archive, or search context that lists publications |
isPubListingQuery | Flag set on WP_Query (and available as a REST query param) when listing rules apply |
prc-publication-listing support | Post types that opt into listings, visibility taxonomy, and editor toggles |
Query flow
Flow
3 relationships
Publication listing query
init_pub_listing__wp_query(pre_get_posts, priority 1) detects home / archive / search on the primary site and setsisPubListingQuery.hook_pub_listing_args_into__wp_query(priority 11) mergesQuery::get_filtered_query_args()when the flag is set.include_in_main_feed(priority 11) mergesQuery::get_enabled_post_types()into the main/feed/query only (not comment, archive, singular, search, or customadd_feedslugs).
Filtered query args
Query::get_filtered_query_args() typically:
- Merges supported post types into
post_type - Sets
post_parentto0unlessshowChildPostsis present (non-search) - Forces
post_statustopublishandignore_sticky_poststotrue - Adds a
_post_visibilitytax_queryexcluding slugs fromQuery::get_visibility_terms()(defaulthidden-on-indexorhidden-on-search)
Opting in a post type
add_action( 'init', function () {
add_post_type_support( 'my-post-type', 'prc-publication-listing' );
}, 5 );
Priority 5 runs before taxonomy registration. Support also works inside register_post_type() supports.
Filters
| Filter | Purpose |
|---|---|
prc_platform_pub_listing_default_visibility | Map of post_type => term slug[] applied once on first insert |
prc_platform_pub_listing_visibility_terms | Replace the default visibility slugs to exclude. An empty list skips the default exclusion. |
prc_platform_pub_listing_default_args | Adjust listing query args after support and visibility rules |
REST
Core post collection queries accept isPubListingQuery=true so clients can apply the same listing rules. This is not a custom route namespace.
Editor blocks / assets
| Asset | Role |
|---|---|
prc-publication-listing/post-visibility | Status panel visibility toggles |
prc-block/core-query | Enhances core/query with listing context and defaults |