@@ -15,14 +15,20 @@ |
||
| 15 | 15 | <span class="glsr-addon-link button button-secondary" disabled> |
| 16 | 16 | <?= __('Installed', 'site-reviews'); ?> |
| 17 | 17 | </span> |
| 18 | - <?php else: ?> |
|
| 19 | - <a href="<?= wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin='.$plugin), 'activate-plugin_'.$plugin); ?>" class="glsr-addon-link button button-secondary"> |
|
| 18 | + <?php else { |
|
| 19 | + : ?> |
|
| 20 | + <a href="<?= wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin='.$plugin), 'activate-plugin_'.$plugin); |
|
| 21 | +} |
|
| 22 | +?>" class="glsr-addon-link button button-secondary"> |
|
| 20 | 23 | <?= __('Activate', 'site-reviews'); ?> |
| 21 | 24 | </a> |
| 22 | 25 | <?php endif; ?> |
| 23 | - <?php else: ?> |
|
| 26 | + <?php else { |
|
| 27 | + : ?> |
|
| 24 | 28 | <a href="{{ link }}" class="glsr-addon-link glsr-external button button-secondary"> |
| 25 | - <?= __('More Info', 'site-reviews'); ?> |
|
| 29 | + <?= __('More Info', 'site-reviews'); |
|
| 30 | +} |
|
| 31 | +?> |
|
| 26 | 32 | </a> |
| 27 | 33 | <?php endif; ?> |
| 28 | 34 | </div> |
@@ -130,7 +130,8 @@ |
||
| 130 | 130 | $template = trim(glsr(OptionManager::class)->get('settings.general.notification_message')); |
| 131 | 131 | if (!empty($template)) { |
| 132 | 132 | $message = glsr(Template::class)->interpolate($template, $this->email['template-tags'], $this->email['template']); |
| 133 | - } elseif ($this->email['template']) { |
|
| 133 | + } |
|
| 134 | + elseif ($this->email['template']) { |
|
| 134 | 135 | $message = glsr(Template::class)->build('templates/'.$this->email['template'], [ |
| 135 | 136 | 'context' => $this->email['template-tags'], |
| 136 | 137 | ]); |
@@ -216,7 +216,8 @@ |
||
| 216 | 216 | if (!empty($field['label'])) { |
| 217 | 217 | $field['legend'] = $field['label']; |
| 218 | 218 | unset($field['label']); |
| 219 | - } else { |
|
| 219 | + } |
|
| 220 | + else { |
|
| 220 | 221 | $field['is_valid'] = false; |
| 221 | 222 | glsr_log()->warning('Setting field is missing a label')->debug($field); |
| 222 | 223 | } |
@@ -328,7 +328,8 @@ |
||
| 328 | 328 | } |
| 329 | 329 | if (is_array($params[0])) { |
| 330 | 330 | $this->args += $params[0]; |
| 331 | - } elseif (is_array($params[1])) { |
|
| 331 | + } |
|
| 332 | + elseif (is_array($params[1])) { |
|
| 332 | 333 | $this->args += $params[1]; |
| 333 | 334 | } |
| 334 | 335 | if (!isset($this->args['is_public'])) { |
@@ -302,7 +302,8 @@ |
||
| 302 | 302 | } |
| 303 | 303 | if (in_array($field->field['type'], ['radio', 'checkbox'])) { |
| 304 | 304 | $field->field['checked'] = $field->field['value'] == $this->values[$field->field['path']]; |
| 305 | - } else { |
|
| 305 | + } |
|
| 306 | + else { |
|
| 306 | 307 | $field->field['value'] = $this->values[$field->field['path']]; |
| 307 | 308 | } |
| 308 | 309 | } |
@@ -73,7 +73,8 @@ discard block |
||
| 73 | 73 | foreach ($potEntries as $key => $entry) { |
| 74 | 74 | $entries[html_entity_decode($key, ENT_COMPAT, 'UTF-8')] = $entry; |
| 75 | 75 | } |
| 76 | - } catch (Exception $e) { |
|
| 76 | + } |
|
| 77 | + catch (Exception $e) { |
|
| 77 | 78 | glsr_log()->error($e->getMessage()); |
| 78 | 79 | } |
| 79 | 80 | return $entries; |
@@ -196,7 +197,8 @@ discard block |
||
| 196 | 197 | if (in_array($needle, [$single, $plural])) { |
| 197 | 198 | $this->results[$key] = $entry; |
| 198 | 199 | } |
| 199 | - } elseif (false !== strpos(sprintf('%s %s', $single, $plural), $needle)) { |
|
| 200 | + } |
|
| 201 | + elseif (false !== strpos(sprintf('%s %s', $single, $plural), $needle)) { |
|
| 200 | 202 | $this->results[$key] = $entry; |
| 201 | 203 | } |
| 202 | 204 | } |
@@ -242,7 +244,8 @@ discard block |
||
| 242 | 244 | foreach ($keys as $key) { |
| 243 | 245 | try { |
| 244 | 246 | $entry = $this->normalizeEntryString($entry, $key); |
| 245 | - } catch (\TypeError $error) { |
|
| 247 | + } |
|
| 248 | + catch (\TypeError $error) { |
|
| 246 | 249 | glsr_log()->once('error', 'Translation/normalize', $error); |
| 247 | 250 | glsr_log()->once('debug', 'Translation/normalize', $entry); |
| 248 | 251 | } |
@@ -415,7 +415,8 @@ |
||
| 415 | 415 | { |
| 416 | 416 | if ($value instanceof DateTime) { |
| 417 | 417 | $value = $value->format('Y-m-d H:i:s'); |
| 418 | - } elseif ($this->isObjectOrArray($value)) { |
|
| 418 | + } |
|
| 419 | + elseif ($this->isObjectOrArray($value)) { |
|
| 419 | 420 | $value = json_encode($value); |
| 420 | 421 | } |
| 421 | 422 | return (string) $value; |
@@ -185,7 +185,8 @@ |
||
| 185 | 185 | $hasNumeric = $this->hasRule($attribute, $this->numericRules); |
| 186 | 186 | if (is_numeric($value) && $hasNumeric) { |
| 187 | 187 | return $value; |
| 188 | - } elseif (is_array($value)) { |
|
| 188 | + } |
|
| 189 | + elseif (is_array($value)) { |
|
| 189 | 190 | return count($value); |
| 190 | 191 | } |
| 191 | 192 | return function_exists('mb_strlen') |
@@ -27,7 +27,8 @@ |
||
| 27 | 27 | } |
| 28 | 28 | if ('post_id' == $attributes['assigned_to']) { |
| 29 | 29 | $attributes['assigned_to'] = $attributes['post_id']; |
| 30 | - } elseif ('parent_id' == $attributes['assigned_to']) { |
|
| 30 | + } |
|
| 31 | + elseif ('parent_id' == $attributes['assigned_to']) { |
|
| 31 | 32 | $attributes['assigned_to'] = wp_get_post_parent_id($attributes['post_id']); |
| 32 | 33 | } |
| 33 | 34 | return $attributes; |