Conditions | 6 |
Paths | 9 |
Total Lines | 26 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
24 | function addVerifyHeaders(&$event, $param) { |
||
25 | if (empty($event->data)||empty($event->data['meta'])) { |
||
26 | return; |
||
27 | } |
||
28 | |||
29 | /* Google */ |
||
30 | $g = $this->getConf('webmaster_google'); |
||
31 | if (!empty($g)) { |
||
32 | $g = array('name' => 'google-site-verification', 'content' => $g); |
||
33 | $event->data['meta'][] = $g; |
||
34 | } |
||
35 | |||
36 | /* bing */ |
||
37 | $b = $this->getConf('webmaster_bing'); |
||
38 | if (!empty($b)) { |
||
39 | $b = array('name' => 'msvalidate.01', 'content' => $b); |
||
40 | $event->data['meta'][] = $b; |
||
41 | } |
||
42 | |||
43 | /* Yandex */ |
||
44 | $y = $this->getConf('webmaster_yandexkey'); |
||
45 | if (!empty($y)) { |
||
46 | $y = array('name' => 'yandex-verification', 'content' => $y); |
||
47 | $event->data['meta'][] = $y; |
||
48 | } |
||
49 | } |
||
50 | } |
||
51 |
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.