File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ Significance: patch
2+ Type: fixed
3+
4+ Reply block now shows fallback link when oEmbed fails instead of empty div.
Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ public static function render_reply_block( $attrs ) {
204204 $ html = '<div ' . $ wrapper_attrs . '> ' ;
205205
206206 // Try to get and append the embed if requested.
207+ $ embed = null ;
207208 if ( $ show_embed ) {
208209 $ embed = wp_oembed_get ( $ attrs ['url ' ] );
209210 if ( $ embed ) {
@@ -212,8 +213,8 @@ public static function render_reply_block( $attrs ) {
212213 }
213214 }
214215
215- // Only show the link if we're not showing the embed.
216- if ( ! $ show_embed ) {
216+ // Show the link if embed is not requested or if embed failed .
217+ if ( ! $ show_embed || ! $ embed ) {
217218 $ html .= sprintf (
218219 '<p><a title="%2$s" aria-label="%2$s" href="%1$s" class="u-in-reply-to" target="_blank">%3$s</a></p> ' ,
219220 esc_url ( $ attrs ['url ' ] ),
You can’t perform that action at this time.
0 commit comments