| Conditions | 6 |
| Paths | 9 |
| Total Lines | 24 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | function addVerifyHeaders(&$event, $param) { |
||
| 21 | if(empty($event->data)||empty($event->data['meta'])) return; |
||
| 22 | |||
| 23 | /* Google */ |
||
| 24 | $g = $this->getConf('webmaster_google'); |
||
| 25 | if (!empty($g)) { |
||
| 26 | $g = array('name' => 'google-site-verification', 'content' => $g); |
||
| 27 | $event->data['meta'][] = $g; |
||
| 28 | } |
||
| 29 | |||
| 30 | /* bing */ |
||
| 31 | $b = $this->getConf('webmaster_bing'); |
||
| 32 | if (!empty($b)) { |
||
| 33 | $b = array('name' => 'msvalidate.01', 'content' => $b); |
||
| 34 | $event->data['meta'][] = $b; |
||
| 35 | } |
||
| 36 | |||
| 37 | /* Yandex */ |
||
| 38 | $y = $this->getConf('webmaster_yandexkey'); |
||
| 39 | if (!empty($y)) { |
||
| 40 | $y = array('name' => 'yandex-verification', 'content' => $y); |
||
| 41 | $event->data['meta'][] = $y; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | } |
||
| 45 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.