Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duotone first render in Safari #36754

Merged
merged 1 commit into from
Nov 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/block-supports/duotone.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,10 @@ function gutenberg_render_duotone_filter_preset( $preset ) {
}

add_action(
// Safari doesn't render SVG filters defined in data URIs,
// and SVG filters won't render in the head of a document,
// so the next best place to put the SVG is in the footer.
is_admin() ? 'admin_footer' : 'wp_footer',
// SVG filters won't render at all in the head of a document and
// Safari incorrectly renders SVG filters in the footer, so the
// beginning of the body seems to be the safest place to render.
'wp_body_open',
function () use ( $svg ) {
echo $svg;
}
Expand Down