diff --git a/inc/render.php b/inc/render.php index 94c51a5..4c0b03e 100644 --- a/inc/render.php +++ b/inc/render.php @@ -45,8 +45,11 @@ function bootstrap(): void { * @return string Filtered block markup. */ function render( $block_content, array $block ): string { - $attributes = $block['attrs'] ?? []; - $icon = icon_markup( $attributes ); + // Another filter on this hook can hand back null, and this runs for every + // button on the site, icon or not. + $block_content = (string) $block_content; + $attributes = $block['attrs'] ?? []; + $icon = icon_markup( $attributes ); if ( '' === $icon ) { return $block_content;