Skip to content

Commit 354129b

Browse files
authored
Only revert to URL if there is one (#975)
1 parent 6f140b4 commit 354129b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

includes/transformer/class-post.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,9 @@ public function get_summary_map() {
10671067
* @return string A block level link
10681068
*/
10691069
public static function revert_embed_links( $block_content, $block ) {
1070+
if ( ! isset( $block['attrs']['url'] ) ) {
1071+
return $block_content;
1072+
}
10701073
return '<p><a href="' . esc_url( $block['attrs']['url'] ) . '">' . $block['attrs']['url'] . '</a></p>';
10711074
}
10721075

0 commit comments

Comments
 (0)