File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public function getUrl()
106106 */
107107 public function getAuthorName ()
108108 {
109- return $ this ->bag ->get ('author ' ) ?: $ this ->bag ->get ('contributors ' );
109+ return $ this ->bag ->get ('author ' ) ?: $ this ->bag ->get ('article:author ' ) ?: $ this -> bag -> get ( ' contributors ' );
110110 }
111111
112112 /**
@@ -300,6 +300,10 @@ private function extractMetas(DOMDocument $html)
300300 if ($ meta ->hasAttribute ('http-equiv ' )) {
301301 $ this ->bag ->set ($ meta ->getAttribute ('http-equiv ' ), $ value );
302302 }
303+
304+ if ($ meta ->hasAttribute ('property ' )) {
305+ $ this ->bag ->set ($ meta ->getAttribute ('property ' ), $ value );
306+ }
303307 }
304308 }
305309
Original file line number Diff line number Diff line change @@ -108,6 +108,18 @@ public function getAuthorName()
108108 return $ this ->bag ->get ('creator ' );
109109 }
110110
111+ /**
112+ * {@inheritdoc}
113+ */
114+ public function getAuthorUrl ()
115+ {
116+ $ author = $ this ->getAuthorName ();
117+
118+ if (!empty ($ author )) {
119+ return 'https://twitter.com/ ' .ltrim ($ author , '@ ' );
120+ }
121+ }
122+
111123 /**
112124 * {@inheritdoc}
113125 */
You can’t perform that action at this time.
0 commit comments