@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function handle_tpl_metaheader_output(Doku_Event $event, $param) { |
56 | 56 | global $ID, $conf, $INFO; |
57 | 57 | |
58 | - if(!page_exists($ID)) { |
|
58 | + if (!page_exists($ID)) { |
|
59 | 59 | return; |
60 | 60 | } |
61 | 61 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | ); |
78 | 78 | |
79 | 79 | $desc = p_get_metadata($ID, 'description', true); |
80 | - if(!empty($desc)) { |
|
80 | + if (!empty($desc)) { |
|
81 | 81 | $desc = str_replace("\n", " ", $desc['abstract']); |
82 | 82 | $event->data['meta'][] = array( |
83 | 83 | 'name' => 'twitter:description', |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | ); |
86 | 86 | } |
87 | 87 | |
88 | - if($this->getConf('twitterUserName') != '') { |
|
88 | + if ($this->getConf('twitterUserName') != '') { |
|
89 | 89 | $event->data['meta'][] = array( |
90 | 90 | 'name' => 'twitter:creator', |
91 | 91 | 'content' => $this->getConf('twitterUserName'), |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | 'property' => 'og:title', |
132 | 132 | 'content' => p_get_metadata($ID, 'title', true), |
133 | 133 | ); |
134 | - if(!empty($desc)) { |
|
134 | + if (!empty($desc)) { |
|
135 | 135 | $event->data['meta'][] = array( |
136 | 136 | 'property' => 'og:description', |
137 | 137 | 'content' => $desc, |
@@ -165,11 +165,11 @@ discard block |
||
165 | 165 | // $event->data['meta'][] = array('property' => 'article:author','content' => p_get_metadata($ID,'creator',true),); |
166 | 166 | // $event->data['meta'][] = array('property' => 'article:author','content' => p_get_metadata($ID,'user',true),); |
167 | 167 | $_subject = p_get_metadata($ID, 'subject', true); |
168 | - if(!empty($_subject)) { |
|
169 | - if(!is_array($_subject)) { |
|
168 | + if (!empty($_subject)) { |
|
169 | + if (!is_array($_subject)) { |
|
170 | 170 | $_subject = array($_subject); |
171 | 171 | } |
172 | - foreach($_subject as $tag) { |
|
172 | + foreach ($_subject as $tag) { |
|
173 | 173 | $event->data['meta'][] = array( |
174 | 174 | 'property' => 'article:tag', |
175 | 175 | 'content' => $tag, |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $geotags = p_get_metadata($ID, 'geo', true); |
182 | 182 | $lat = $geotags['lat']; |
183 | 183 | $lon = $geotags['lon']; |
184 | - if(!(empty($lat) && empty($lon))) { |
|
184 | + if (!(empty($lat) && empty($lon))) { |
|
185 | 185 | $event->data['meta'][] = array( |
186 | 186 | 'property' => 'place:location:latitude', |
187 | 187 | 'content' => $lat, |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } |
194 | 194 | // see https://developers.facebook.com/docs/opengraph/property-types/#geopoint |
195 | 195 | $alt = $geotags['alt']; |
196 | - if(!empty($alt)) { |
|
196 | + if (!empty($alt)) { |
|
197 | 197 | // facebook expects feet... |
198 | 198 | $alt = $alt * 3.2808; |
199 | 199 | $event->data['meta'][] = array( |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | |
214 | 214 | // optional facebook app ID |
215 | 215 | $appId = $this->getConf('fbAppId'); |
216 | - if(!empty($appId)) { |
|
216 | + if (!empty($appId)) { |
|
217 | 217 | $event->data['meta'][] = array( |
218 | 218 | 'property' => 'fb:app_id', |
219 | 219 | 'content' => $appId, |
@@ -232,9 +232,9 @@ discard block |
||
232 | 232 | $rel = p_get_metadata($ID, 'relation', true); |
233 | 233 | $img = $rel['firstimage']; |
234 | 234 | |
235 | - if(empty($img)) { |
|
235 | + if (empty($img)) { |
|
236 | 236 | $img = $this->getConf('fallbackImage'); |
237 | - if(substr($img, 0, 4) === "http") { |
|
237 | + if (substr($img, 0, 4) === "http") { |
|
238 | 238 | // don't use ml() as this results in a HTTP redirect after |
239 | 239 | // hitting the wiki making the card image fail. |
240 | 240 | return $img; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $imgID = $rel['firstimage']; |
257 | 257 | $alt = ""; |
258 | 258 | |
259 | - if(!empty($imgID)) { |
|
259 | + if (!empty($imgID)) { |
|
260 | 260 | require_once(DOKU_INC . 'inc/JpegMeta.php'); |
261 | 261 | $jpegmeta = new JpegMeta(mediaFN($imgID)); |
262 | 262 | $tags = array( |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | 'IPTC.Headline', |
268 | 268 | 'Xmp.dc:title' |
269 | 269 | ); |
270 | - $alt = media_getTag($tags, $jpegmeta, ""); |
|
270 | + $alt = media_getTag($tags, $jpegmeta, ""); |
|
271 | 271 | } |
272 | 272 | return htmlspecialchars($alt); |
273 | 273 | } |