PRC's override/extension of the WordPress core/pullquote block.
Block Namespace
prc-block/core-pullquote
What PRC Customizes
- Deregisters the core pullquote stylesheet and re-registers it with PRC's custom version
- Registers a "Fancy Quote" block style
- Adds smart curly quotes around pullquote text via CSS pseudo-elements
- Styles the citation with a right-aligned layout and dash prefix
- Controls float alignment and max-width for left/right aligned pullquotes
Supports Modifications
None.
Additional Attributes
None.
Available Styles
| Style Name | Label | Description |
|---|---|---|
fancy-quote | Fancy Quote | Left-aligned text variant |
Registered in PHP via register_block_style with inline CSS.
Style Overrides
File: style.scss
- Base pullquote —
max-width: 420pxvia CSS custom property,color: #565656,font-size: 20px,line-height: 30px, zero padding - Blockquote —
padding: 24px, clearfix via::after, color inherited - Smart quotes —
p:first-child::beforeadds an opening curly quote;p:last-of-type::afteradds a closing curly quote - Text alignment — supports
has-text-align-centerandhas-text-align-rightclasses - Citation — floated right,
font-size: 15px, sans-serif font family,::beforepseudo-element adds a 10px horizontal line separator withborder-bottom: 1px solid #8c8c8c - Left/right alignment —
alignleftandalignrightclasses (and editordata-alignequivalents) constrain tomax-width: 420pxand apply appropriate float
Editor Enhancements
None. No editor script.
Frontend Interactivity
None. No view.js file.
PHP Rendering
File: class-core-pullquote.php
register_assets(inithook) — registers the PRC style handle and thefancy-quoteblock styleregister_style(enqueue_block_assetshook) — deregisters the corewp-block-pullquotestylesheet and re-registers it using PRC's custom stylesheet source
No render filter modifications to block content.
Block Markup Example
<!-- Default pullquote -->
<figure class="wp-block-pullquote alignright">
<blockquote>
<p>The survey found significant differences across demographic groups.</p>
<cite class="wp-block-pullquote__citation">Pew Research Center</cite>
</blockquote>
</figure>
<!-- Fancy Quote style -->
<figure class="wp-block-pullquote is-style-fancy-quote">
<blockquote>
<p>A notable finding from the research.</p>
<cite class="wp-block-pullquote__citation">Source Name</cite>
</blockquote>
</figure>
Variations
None.