Commit f703530f1703b0c9cc3976ec1925a6aaf2d211b6
1 parent
ecbf2914
seo h1 fix
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
frontend/widgets/Seo.php
... | ... | @@ -69,7 +69,7 @@ class Seo extends Widget |
69 | 69 | |
70 | 70 | if(empty($filter) && empty($sort) && empty($paginate) ){ |
71 | 71 | |
72 | - return $this->selectSeoData(self::SEO_TEXT); | |
72 | + return $this->selectSeoData(self::SEO_TEXT, $priority); | |
73 | 73 | |
74 | 74 | } else { |
75 | 75 | |
... | ... | @@ -102,7 +102,7 @@ class Seo extends Widget |
102 | 102 | |
103 | 103 | $filter = \Yii::$app->request->get('filters', []); |
104 | 104 | |
105 | - $default = $this->selectSeoData(self::H1); | |
105 | + $default = $this->selectSeoData(self::H1, $priority); | |
106 | 106 | |
107 | 107 | if (($default != $this->{self::H1}) || $priority == 1) { |
108 | 108 | |
... | ... | @@ -124,7 +124,7 @@ class Seo extends Widget |
124 | 124 | $filter = \Yii::$app->request->get('filters', []); |
125 | 125 | |
126 | 126 | |
127 | - $title = $this->selectSeoData(self::TITLE); | |
127 | + $title = $this->selectSeoData(self::TITLE, $priority); | |
128 | 128 | |
129 | 129 | |
130 | 130 | if(!empty($filter) && isset($this->fields['meta-title']) && $title == $this->fields['meta-title']) { |
... | ... | @@ -184,7 +184,7 @@ class Seo extends Widget |
184 | 184 | |
185 | 185 | break; |
186 | 186 | case self::DESCRIPTION: |
187 | - $description = $this->selectSeoData(self::DESCRIPTION); | |
187 | + $description = $this->selectSeoData(self::DESCRIPTION, $priority); | |
188 | 188 | |
189 | 189 | |
190 | 190 | $filter = \Yii::$app->request->get('filters', []); |
... | ... | @@ -207,7 +207,7 @@ class Seo extends Widget |
207 | 207 | break; |
208 | 208 | case self::META: |
209 | 209 | |
210 | - $meta = $this->selectSeoData(self::META); | |
210 | + $meta = $this->selectSeoData(self::META, $priority); | |
211 | 211 | |
212 | 212 | $filter = \Yii::$app->request->get('filters', []); |
213 | 213 | $sort = \Yii::$app->request->get('sort', []); |
... | ... | @@ -334,7 +334,7 @@ class Seo extends Widget |
334 | 334 | } |
335 | 335 | } |
336 | 336 | |
337 | - protected function selectSeoData($param) | |
337 | + protected function selectSeoData($param, &$priority) | |
338 | 338 | { |
339 | 339 | $result = ''; |
340 | 340 | ... | ... |