diff --git a/lib/block-supports/duotone.php b/lib/block-supports/duotone.php index f3b4743832f0ae..aa38c55f4bd5b1 100644 --- a/lib/block-supports/duotone.php +++ b/lib/block-supports/duotone.php @@ -351,7 +351,15 @@ function ( $selector ) use ( $duotone_id ) { 1 ); - return $content . $duotone; + add_action( + // Ideally we should use wp_head, but SVG defs can't be put in there. + 'wp_footer', + function () use ( $duotone ) { + echo $duotone; + } + ); + + return $content; } // Register the block support.