[wp-trac] [WordPress Trac] #6: the_excerpt() on non-excerpt posts doesn't stripslashes
WordPress Trac
noreply at wordpress.org
Thu Oct 6 10:50:33 UTC 2022
#6: the_excerpt() on non-excerpt posts doesn't stripslashes
--------------------------------------+---------------------
Reporter: anonymousbugger | Owner: ryan
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Template | Version:
Severity: minor | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by prbot):
''This ticket was mentioned in [https://github.com/WordPress/wordpress-
develop/pull/3411 PR #3411] on [https://github.com/WordPress/wordpress-
develop/ WordPress/wordpress-develop] by [https://github.com/oandregal
oandregal].''
## What
This PR fixes an issue by which the styles of `cite` element declared via
`theme.json` are not enqueued.
## Why
All element's styles should work.
## How
By registering the element into the proper allowed list array.
## Test
- Add the following snippet to your theme's `theme.json` (I've tested with
TwentyTwentyTwo):
{{{json
{
"elements": {
"cite": {
"color": {
"background": "hotpink"
}
}
}
}
}}}
- Go to the post editor and add a quote block. Fill it with text and a
cite.
The expected result is that in the editors and the frontend the cite of
the quote should have hotpink as background color.
## Notes
Note this works as expected with the Gutenberg plugin active but not in
core without the plugin because
[https://github.com/WordPress/gutenberg/blob/trunk/lib/compat/wordpress-6.1
/class-wp-theme-json-6-1.php#L117 it's part of the registry].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/6#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list