Skip to content

Commit 3881110

Browse files
TwitterCards - search name in property attribute
Twitter automatically falls back to <meta property=""> if <meta name""> is absent, so this should also be the case here.
1 parent 2c0e112 commit 3881110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Providers/TwitterCards.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(Adapter $adapter)
2222
}
2323

2424
foreach ($html->getElementsByTagName('meta') as $meta) {
25-
$name = trim(strtolower($meta->getAttribute('name')));
25+
$name = trim(strtolower($meta->getAttribute('name') ?: $meta->getAttribute('property')));
2626
$value = $meta->getAttribute('content') ?: $meta->getAttribute('value');
2727

2828
if (empty($name) || empty($value)) {

0 commit comments

Comments
 (0)