PRC's override/extension of the WordPress core/post-content block.
prc-block/core-post-content
- Resets the CSS counter for the Big Number paragraph style within post content
- Adds link underlines for all paragraph links
- Overrides
h5heading styles to italic Georgia - Uses CSS container queries for responsive alignment of floated blocks (alignleft/alignright)
- Adjusts heading font sizes for mobile viewports via container queries
- Handles attachment page rendering for images, VideoPress videos, and unsupported file types
- Provides a fallback for posts using the
layout-no-container-querytemplate with standard media queries
None.
None.
None.
File: style.scss
- Counter reset --
counter-reset: big-numberon.wp-block-post-contentto support the Big Number paragraph style - Link underlines --
text-decoration: underlineonp ainside post content - H5 override -- forces Georgia font family, italic style, no text-transform, 1em font-size, zero letter-spacing
- Wide content well (container query
min-width: 860px) -- adjustsmargin-left/margin-rightfor.alignleftand.alignrightblocks relative to--wp--style--global--wide-size - Standard content well (container query
min-width: 639px) -- adjusts alignment margins relative to--wp--style--global--content-size - Mobile (container query
max-width: 638px) -- centers aligned blocks, removes float - Mobile headings (container query
max-width: 480px) -- reduces h1 through h4 font sizes - No-container-query fallback -- uses
@mediaqueries for thelayout-no-container-querybody class
File: editor.scss
- Inherits
colorandbackgroundfrom parent on.wp-block-prc-block-core-post-content.wp-block
File: index.js
- Imports
style.scssandeditor.scssfor editor/frontend styles - Defines
BLOCKNAMEandBLOCKIDENTIFIERconstants; no additional editor logic
None. No view.js file.
File: class-core-post-content.php
register_assets(inithook) -- registers the block's style handleregister_style(enqueue_block_assetshook) -- enqueues the stylerender(render_blockfilter) -- on attachment pages, replaces block content with:- Images -- renders a
figure.wp-block-imagewith the large-size image plus a download link to the full-size image - Videos -- renders a VideoPress shortcode if a
videopress_guidmeta value exists - Other file types -- displays a "File type not yet supported" message
- Images -- renders a
<!-- Standard post content wrapper -->
<div class="wp-block-post-content">
<p><a href="/link">Underlined link</a></p>
<h5>Italic Georgia Subheading</h5>
</div>On an attachment page (image):
<figure class="wp-block-image aligncenter size-large">
<img src="image-large.jpg" alt="Title" class="wp-image-123">
</figure>
<h5>Download</h5>
<a href="image-full.jpg" download>Title</a>None.