Guide

Art Direction architecture

Slot model, storage, render takeover, and integrations.

Data model

ItemValue
Post metaartDirection (camelCase object)
REST fieldart_direction
Post type supportprc-art-direction
Default enabled typepost
Opt-in filterprc_platform__art_direction_enabled_post_types

Prefer add_post_type_support( $type, 'prc-art-direction' ) for new types.

Slot schema

Allowed keys: A1, A2, A3, A4, XL, social.

Per slot: id, rawUrl, url, width, height, chartArt, caption.

Legacy facebook / twitter keys migrate to social on REST read/write. WP-CLI: wp prc art-direction migrate-social.

PHP API

\PRC\Platform\Art_Direction\get( $post_id, $size ); // wrapper around API::get()

Instantiate PRC\Platform\Art_Direction\API with a post ID and call ->get( $slot ) or ->get( 'all' ).

Fallback

If artDirection meta is empty but the post has a featured image (_thumbnail_id), the API builds all slots from registered image sizes (A1, A1-HIDPI, A1-SMALL, and peers). Child posts resolve to the parent ID.

core/post-featured-image

block_type_metadata adds attributes:

AttributeTypeDefault
imageSizestringA1
isChartArtbooleanfalse

render_block replaces frontend output with a responsive <picture> built from art direction data. Missing art data returns the original block content. Editor toolbar exposes sizes A1–A4, XL, and the chart-art toggle.

Integrations

IntegrationBehavior
Yoast SEOwpseo_opengraph_image / wpseo_twitter_image use the social slot when set
10up DistributorRemaps attachment IDs/URLs per slot when distributor_register_data() exists
Attachments panelInjects Art Direction UI via prc-platform.attachments-panel
Schema SEO UIInjects social slot via prc-platform.seo.ui.social

Was this helpful?