Skip to content

Commit a378490

Browse files
committed
improved tags retrieving #130
1 parent a79b08b commit a378490

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/Providers/Html.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,9 @@ public function getType()
6969
*/
7070
public function getTags()
7171
{
72-
if (!$this->bag->has('keywords')) {
73-
return [];
74-
}
75-
76-
$keywords = $this->bag->get('keywords');
77-
78-
//some sites, contains the keywords separated by commas
79-
if (strpos($keywords, ',')) {
80-
$keywords = explode(',', $keywords);
81-
//and others by spaces (ex: youtube)
82-
} else {
83-
$keywords = explode(' ', $keywords);
84-
}
72+
$keywords = $this->bag->get('keywords').','.$this->bag->get('news_keywords');
8573

86-
return array_filter(array_map('trim', $keywords));
74+
return array_filter(array_map('trim', explode(',', $keywords)));
8775
}
8876

8977
/**

0 commit comments

Comments
 (0)