WordPress 7.2 adds a Text shadow control to the Paragraph and Heading blocks, with two default presets, Light and Strong. If you build or maintain block themes, you will want to swap those for presets that match the design, or remove the control so nobody adds glowing headings to a client site.
As of 2026-11-11, 7.2 is still in beta. Beta 5 shipped on November 10 and the final release is scheduled for December 8, 2026, so now is a good time to prepare your theme.json. The keys and examples below come from the text shadow dev note published today.
What changes between 7.1 and 7.2
In 7.1, text shadow existed only as a theme.json style. You could set styles.typography.textShadow globally, per block or per element, but there was no control in the editor and no presets.
7.2 turns it into a block support. Blocks that declare it get a Text shadow control in the Typography panel, and Global Styles gets a Typography > Text shadow presets screen where users can edit the defaults or add their own. Paragraph and Heading are the first core blocks to use it.
The control is hidden by default. Users reveal it from the Typography panel’s options menu. When they pick a preset, its slug is saved in the block’s textShadow attribute and printed as a class:
<!-- wp:paragraph {"textShadow":"strong"} -->
<p class="has-strong-text-shadow">Hello World</p>
<!-- /wp:paragraph -->
That class matters later. It stays in the post content even if you remove the feature from your theme.
Step 1. Edit theme.json in a child theme
Back up theme.json before you touch it. If the theme comes from WordPress.org or a vendor, make the changes in a child theme’s theme.json, or the next theme update wipes them. I covered the setup in how to create a WordPress child theme.
Step 2. Add your own text shadow presets
Presets live under settings.typography.textShadowPresets. This is the example from the dev note:
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"settings": {
"typography": {
"textShadowPresets": [
{
"name": "Soft",
"slug": "soft",
"textShadow": "1px 1px 2px rgba(0, 0, 0, 0.3)"
},
{
"name": "Glow",
"slug": "glow",
"textShadow": "0 0 8px rgba(255, 215, 0, 0.8)"
}
]
}
}
}
Each preset needs a name, a slug and a textShadow value, which is any valid CSS text-shadow. If your theme.json already has a typography section with font sizes or families, add the key next to them instead of pasting a second settings object.
For every preset WordPress outputs a CSS custom property, --wp--preset--text-shadow--{slug}, and a class, .has-{slug}-text-shadow. Theme presets appear in the control next to Light and Strong. Once there are 7 or more, the list turns into a compact dropdown.
Step 3. Apply a preset to every heading
The 7.1 styles.typography.textShadow property now also accepts a preset reference. To give all Heading blocks the Soft shadow by default:
{
"version": 3,
"styles": {
"blocks": {
"core/heading": {
"typography": {
"textShadow": "var:preset|text-shadow|soft"
}
}
}
}
}
The cascade works like other styles: Global Styles values override the theme default, and a value set on one block overrides both. An editor can still pick None on a single heading.
Step 4. Reuse the presets in custom CSS
Because each preset is a custom property, you can use it in your stylesheet for elements that are not blocks, so the site title or a hero overlay matches the editor:
.hero-title {
text-shadow: var(--wp--preset--text-shadow--soft);
}
Change the preset value in theme.json later and every place that uses it follows.
Hide the default presets or remove text shadow completely
Two settings control this. defaultTextShadowPresets set to false hides Light and Strong but keeps your own presets. textShadow set to false removes the feature.
{
"version": 3,
"settings": {
"typography": {
"textShadow": false,
"defaultTextShadowPresets": false
}
}
}
The dev note sets both keys to remove the feature and does not say whether textShadow: false alone also hides the presets. I would set both, as above.
Turn it off from PHP when you cannot edit theme.json
Sometimes you do not want to fork a parent theme just for two settings, or you manage many sites from one plugin. The wp_theme_json_data_theme filter (available since 6.1) merges your data on top of the theme’s theme.json. Put this in a child theme’s functions.php or a site plugin:
add_filter( 'wp_theme_json_data_theme', function ( $theme_json ) {
return $theme_json->update_with(
array(
'version' => 3,
'settings' => array(
'typography' => array(
'textShadow' => false,
'defaultTextShadowPresets' => false,
),
),
)
);
} );
💡 Keep 'version' => 3 in the array. The example on the hook’s reference page notes the merge does not work without it.
The same filter can add presets instead of removing them. Pass a textShadowPresets array in the same shape as the JSON in Step 2.
Find posts that already use a text shadow
Turning the setting off does not rewrite saved posts. Blocks that already use a preset keep their has-{slug}-text-shadow class, so check them after the change. This read-only query lists published posts with such a class:
wp db query "SELECT ID, post_title FROM wp_posts WHERE post_content LIKE '%-text-shadow%' AND post_status = 'publish';"
You get a table of IDs and titles. Empty output means no published post uses a text shadow class yet, so you can disable the feature without checking anything.
💡 Replace wp_ with your table prefix. wp db prefix prints it.
Give your own blocks the text shadow control
Custom blocks opt in through block.json. The second key makes the control visible in the Typography panel without the user opening the options menu:
{
"supports": {
"typography": {
"textShadow": true,
"__experimentalDefaultControls": {
"textShadow": true
}
}
}
}
The block then reads the same presets as Paragraph and Heading, including the ones from your theme.json. Keep in mind that anything prefixed with __experimental can still change.
7.2 changes more than typography in the admin, so if you maintain custom admin CSS, also read my post on the 7.2 SVG admin menu icons. For another small text effect without a plugin, see how to change the text highlight color.
TL;DR: In WordPress 7.2, add brand presets under settings.typography.textShadowPresets, apply one with var:preset|text-shadow|slug, and reuse it in CSS with --wp--preset--text-shadow--slug. To remove the feature, set textShadow and defaultTextShadowPresets to false in theme.json or through the wp_theme_json_data_theme filter, and test it on the beta before December 8.

