|
@@ 1194-1196 (lines=3) @@
|
| 1191 |
|
* @return string The tweet URL. Empty string if there is none available. |
| 1192 |
|
*/ |
| 1193 |
|
private static function extract_tweet_from_block( $block ) { |
| 1194 |
|
if ( 'core/embed' === $block['blockName'] && 'twitter' === $block['attrs']['providerNameSlug'] ) { |
| 1195 |
|
return $block['attrs']['url']; |
| 1196 |
|
} |
| 1197 |
|
|
| 1198 |
|
return ''; |
| 1199 |
|
} |
|
@@ 1215-1217 (lines=3) @@
|
| 1212 |
|
} |
| 1213 |
|
|
| 1214 |
|
// Twitter embeds are handled in ::extract_tweet_from_block(). |
| 1215 |
|
if ( 'core/embed' === $block['blockName'] && 'twitter' === $block['attrs']['providerNameSlug'] ) { |
| 1216 |
|
return ''; |
| 1217 |
|
} |
| 1218 |
|
|
| 1219 |
|
$url = ''; |
| 1220 |
|
if ( 'block-attributes' === $block_def['content_location'] ) { |