@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | self::$cacheDuration = self::$devMode |
| 287 | 287 | ? self::DEVMODE_CACHE_DURATION |
| 288 | 288 | : self::$settings->metaCacheDuration ?? null; |
| 289 | - self::$cacheDuration = self::$cacheDuration === null ? null : (int)self::$cacheDuration; |
|
| 289 | + self::$cacheDuration = self::$cacheDuration === null ? null : (int) self::$cacheDuration; |
|
| 290 | 290 | self::$environment = EnvironmentHelper::determineEnvironment(); |
| 291 | 291 | MetaValueHelper::cache(); |
| 292 | 292 | // Version helpers |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | $lastSegment = end($segments); |
| 409 | 409 | $site = Craft::$app->getSites()->getSiteByHandle($lastSegment); |
| 410 | 410 | if ($site !== null) { |
| 411 | - $siteSuffix = '/' . $lastSegment; |
|
| 411 | + $siteSuffix = '/'.$lastSegment; |
|
| 412 | 412 | } |
| 413 | 413 | } |
| 414 | 414 | /** @var User $currentUser */ |
@@ -417,31 +417,31 @@ discard block |
||
| 417 | 417 | if ($currentUser->can('seomatic:dashboard')) { |
| 418 | 418 | $subNavs['dashboard'] = [ |
| 419 | 419 | 'label' => Craft::t('seomatic', 'Dashboard'), |
| 420 | - 'url' => 'seomatic/dashboard' . $siteSuffix, |
|
| 420 | + 'url' => 'seomatic/dashboard'.$siteSuffix, |
|
| 421 | 421 | ]; |
| 422 | 422 | } |
| 423 | 423 | if ($currentUser->can('seomatic:global-meta')) { |
| 424 | 424 | $subNavs['global'] = [ |
| 425 | 425 | 'label' => Craft::t('seomatic', 'Global SEO'), |
| 426 | - 'url' => 'seomatic/global/general' . $siteSuffix, |
|
| 426 | + 'url' => 'seomatic/global/general'.$siteSuffix, |
|
| 427 | 427 | ]; |
| 428 | 428 | } |
| 429 | 429 | if ($currentUser->can('seomatic:content-meta')) { |
| 430 | 430 | $subNavs['content'] = [ |
| 431 | 431 | 'label' => Craft::t('seomatic', 'Content SEO'), |
| 432 | - 'url' => 'seomatic/content' . $siteSuffix, |
|
| 432 | + 'url' => 'seomatic/content'.$siteSuffix, |
|
| 433 | 433 | ]; |
| 434 | 434 | } |
| 435 | 435 | if ($currentUser->can('seomatic:site-settings')) { |
| 436 | 436 | $subNavs['site'] = [ |
| 437 | 437 | 'label' => Craft::t('seomatic', 'Site Settings'), |
| 438 | - 'url' => 'seomatic/site/identity' . $siteSuffix, |
|
| 438 | + 'url' => 'seomatic/site/identity'.$siteSuffix, |
|
| 439 | 439 | ]; |
| 440 | 440 | } |
| 441 | 441 | if ($currentUser->can('seomatic:tracking-scripts')) { |
| 442 | 442 | $subNavs['tracking'] = [ |
| 443 | 443 | 'label' => Craft::t('seomatic', 'Tracking Scripts'), |
| 444 | - 'url' => 'seomatic/tracking/gtag' . $siteSuffix, |
|
| 444 | + 'url' => 'seomatic/tracking/gtag'.$siteSuffix, |
|
| 445 | 445 | ]; |
| 446 | 446 | } |
| 447 | 447 | $editableSettings = true; |
@@ -644,14 +644,14 @@ discard block |
||
| 644 | 644 | $element = $e->sender; |
| 645 | 645 | if ($element->uri !== null) { |
| 646 | 646 | $e->previewTargets[] = [ |
| 647 | - 'label' => ' |
|
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $variables['pluginName'] = Seomatic::$settings->pluginName; |
| 133 | 133 | $variables['title'] = $templateTitle; |
| 134 | 134 | $variables['docTitle'] = "{$pluginName} - {$templateTitle}"; |
| 135 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 135 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 136 | 136 | $variables['crumbs'] = [ |
| 137 | 137 | [ |
| 138 | 138 | 'label' => $pluginName, |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | ], |
| 141 | 141 | [ |
| 142 | 142 | 'label' => $templateTitle, |
| 143 | - 'url' => UrlHelper::cpUrl('seomatic/dashboard' . $siteHandleUri), |
|
| 143 | + 'url' => UrlHelper::cpUrl('seomatic/dashboard'.$siteHandleUri), |
|
| 144 | 144 | ], |
| 145 | 145 | ]; |
| 146 | 146 | $variables['selectedSubnavItem'] = 'dashboard'; |
@@ -163,11 +163,11 @@ discard block |
||
| 163 | 163 | foreach ($variables['metaBundles'] as $metaBundle) { |
| 164 | 164 | $stat = 0; |
| 165 | 165 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
| 166 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 166 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 167 | 167 | $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0; |
| 168 | 168 | $variables['contentSetupChecklist'][$setupField] = [ |
| 169 | 169 | 'label' => $setupLabel, |
| 170 | - 'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 170 | + 'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 171 | 171 | ]; |
| 172 | 172 | } |
| 173 | 173 | $stat = round($numGrades - (($stat * $numGrades) / $numFields)); |
@@ -178,16 +178,16 @@ discard block |
||
| 178 | 178 | } |
| 179 | 179 | // Global SEO grades |
| 180 | 180 | Seomatic::$previewingMetaContainers = true; |
| 181 | - $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$siteId); |
|
| 181 | + $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $siteId); |
|
| 182 | 182 | Seomatic::$previewingMetaContainers = false; |
| 183 | 183 | if ($metaBundle !== null) { |
| 184 | 184 | $stat = 0; |
| 185 | 185 | $variables['globalSetupChecklist'] = []; |
| 186 | 186 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
| 187 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 187 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 188 | 188 | $variables['globalSetupChecklist'][$setupField] = [ |
| 189 | 189 | 'label' => $setupLabel, |
| 190 | - 'value' => (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 190 | + 'value' => (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 191 | 191 | ]; |
| 192 | 192 | } |
| 193 | 193 | $stat = round(($stat / $numFields) * 100); |
@@ -197,17 +197,17 @@ discard block |
||
| 197 | 197 | $stat = 0; |
| 198 | 198 | $variables['siteSetupChecklist'] = []; |
| 199 | 199 | foreach (self::SITE_SETUP_FIELDS as $setupField => $setupLabel) { |
| 200 | - $stat += (int)!empty($metaBundle->metaSiteVars[$setupField]); |
|
| 200 | + $stat += (int) !empty($metaBundle->metaSiteVars[$setupField]); |
|
| 201 | 201 | $variables['siteSetupChecklist'][$setupField] = [ |
| 202 | 202 | 'label' => $setupLabel, |
| 203 | - 'value' => (int)!empty($metaBundle->metaSiteVars[$setupField]), |
|
| 203 | + 'value' => (int) !empty($metaBundle->metaSiteVars[$setupField]), |
|
| 204 | 204 | ]; |
| 205 | 205 | } |
| 206 | 206 | foreach (self::IDENTITY_SETUP_FIELDS as $setupField => $setupLabel) { |
| 207 | - $stat += (int)!empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
| 207 | + $stat += (int) !empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
| 208 | 208 | $variables['siteSetupChecklist'][$setupField] = [ |
| 209 | 209 | 'label' => $setupLabel, |
| 210 | - 'value' => (int)!empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
| 210 | + 'value' => (int) !empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
| 211 | 211 | ]; |
| 212 | 212 | } |
| 213 | 213 | $stat = round(($stat / $numFields) * 100); |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $variables['title'] = $templateTitle; |
| 255 | 255 | $variables['subSectionTitle'] = $subSectionTitle; |
| 256 | 256 | $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}"; |
| 257 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 257 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 258 | 258 | $variables['crumbs'] = [ |
| 259 | 259 | [ |
| 260 | 260 | 'label' => $pluginName, |
@@ -262,11 +262,11 @@ discard block |
||
| 262 | 262 | ], |
| 263 | 263 | [ |
| 264 | 264 | 'label' => $templateTitle, |
| 265 | - 'url' => UrlHelper::cpUrl('seomatic/global/general' . $siteHandleUri), |
|
| 265 | + 'url' => UrlHelper::cpUrl('seomatic/global/general'.$siteHandleUri), |
|
| 266 | 266 | ], |
| 267 | 267 | [ |
| 268 | 268 | 'label' => $subSectionTitle, |
| 269 | - 'url' => UrlHelper::cpUrl('seomatic/global/' . $subSection . $siteHandleUri), |
|
| 269 | + 'url' => UrlHelper::cpUrl('seomatic/global/'.$subSection.$siteHandleUri), |
|
| 270 | 270 | ], |
| 271 | 271 | ]; |
| 272 | 272 | $variables['selectedSubnavItem'] = 'global'; |
@@ -274,14 +274,14 @@ discard block |
||
| 274 | 274 | $this->setGlobalFieldSourceVariables($variables); |
| 275 | 275 | // Enabled sites |
| 276 | 276 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
| 277 | - $variables['controllerHandle'] = 'global' . '/' . $subSection; |
|
| 277 | + $variables['controllerHandle'] = 'global'.'/'.$subSection; |
|
| 278 | 278 | $variables['currentSubSection'] = $subSection; |
| 279 | 279 | // Meta bundle settings |
| 280 | 280 | Seomatic::$previewingMetaContainers = true; |
| 281 | 281 | // Get the site to copy the settings from, if any |
| 282 | 282 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
| 283 | 283 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
| 284 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
| 284 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
| 285 | 285 | // Load the metabundle |
| 286 | 286 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
| 287 | 287 | if ($editedMetaBundle) { |
@@ -336,11 +336,11 @@ discard block |
||
| 336 | 336 | // Preview the meta containers |
| 337 | 337 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
| 338 | 338 | MetaBundles::GLOBAL_META_BUNDLE, |
| 339 | - (int)$variables['currentSiteId'] |
|
| 339 | + (int) $variables['currentSiteId'] |
|
| 340 | 340 | ); |
| 341 | 341 | |
| 342 | 342 | // Render the template |
| 343 | - return $this->renderTemplate('seomatic/settings/global/' . $subSection, $variables); |
|
| 343 | + return $this->renderTemplate('seomatic/settings/global/'.$subSection, $variables); |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | /** |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | $variables['pluginName'] = Seomatic::$settings->pluginName; |
| 472 | 472 | $variables['title'] = $templateTitle; |
| 473 | 473 | $variables['docTitle'] = "{$pluginName} - {$templateTitle}"; |
| 474 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 474 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 475 | 475 | $variables['crumbs'] = [ |
| 476 | 476 | [ |
| 477 | 477 | 'label' => $pluginName, |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | ], |
| 480 | 480 | [ |
| 481 | 481 | 'label' => $templateTitle, |
| 482 | - 'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri), |
|
| 482 | + 'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri), |
|
| 483 | 483 | ], |
| 484 | 484 | ]; |
| 485 | 485 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | // Get the site to edit |
| 520 | 520 | $siteId = $this->getSiteIdFromHandle($siteHandle); |
| 521 | 521 | if (is_string($typeId)) { |
| 522 | - $typeId = (int)$typeId; |
|
| 522 | + $typeId = (int) $typeId; |
|
| 523 | 523 | } |
| 524 | 524 | if (empty($typeId)) { |
| 525 | 525 | $typeId = null; |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | $currentType = reset($typeMenu); |
| 538 | 538 | $variables['currentType'] = $typeMenu[$typeId] ?? $currentType; |
| 539 | 539 | $variables['currentTypeId'] = $typeId ?? key($typeMenu); |
| 540 | - $typeId = (int)$variables['currentTypeId']; |
|
| 540 | + $typeId = (int) $variables['currentTypeId']; |
|
| 541 | 541 | } |
| 542 | 542 | // If there's only one EntryType, don't bother displaying the menu |
| 543 | 543 | if (count($typeMenu) === 1) { |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | // Get the site to copy the settings from, if any |
| 570 | 570 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
| 571 | 571 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
| 572 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
| 572 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
| 573 | 573 | // Load the metabundle |
| 574 | 574 | $metaBundle = Seomatic::$plugin->metaBundles->getMetaBundleBySourceHandle( |
| 575 | 575 | $sourceBundleType, |
@@ -595,7 +595,7 @@ discard block |
||
| 595 | 595 | $variables['title'] = $templateTitle; |
| 596 | 596 | $variables['subSectionTitle'] = $subSectionTitle; |
| 597 | 597 | $variables['docTitle'] = "{$pluginName} - Content SEO - {$templateTitle} - {$subSectionTitle}"; |
| 598 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 598 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 599 | 599 | $variables['siteHandleUri'] = $siteHandleUri; |
| 600 | 600 | $variables['crumbs'] = [ |
| 601 | 601 | [ |
@@ -604,10 +604,10 @@ discard block |
||
| 604 | 604 | ], |
| 605 | 605 | [ |
| 606 | 606 | 'label' => 'Content SEO', |
| 607 | - 'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri), |
|
| 607 | + 'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri), |
|
| 608 | 608 | ], |
| 609 | 609 | [ |
| 610 | - 'label' => $metaBundle->sourceName . ' · ' . $subSectionTitle, |
|
| 610 | + 'label' => $metaBundle->sourceName.' · '.$subSectionTitle, |
|
| 611 | 611 | 'url' => UrlHelper::cpUrl("seomatic/edit-content/${subSection}/${sourceBundleType}/${sourceHandle}"), |
| 612 | 612 | ], |
| 613 | 613 | ]; |
@@ -638,13 +638,13 @@ discard block |
||
| 638 | 638 | // Preview the meta containers |
| 639 | 639 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
| 640 | 640 | $uri, |
| 641 | - (int)$variables['currentSiteId'], |
|
| 641 | + (int) $variables['currentSiteId'], |
|
| 642 | 642 | false, |
| 643 | 643 | false |
| 644 | 644 | ); |
| 645 | 645 | |
| 646 | 646 | // Render the template |
| 647 | - return $this->renderTemplate('seomatic/settings/content/' . $subSection, $variables); |
|
| 647 | + return $this->renderTemplate('seomatic/settings/content/'.$subSection, $variables); |
|
| 648 | 648 | } |
| 649 | 649 | |
| 650 | 650 | /** |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | $bundleSettings = $request->getParam('metaBundleSettings'); |
| 666 | 666 | $sitemapSettings = $request->getParam('metaSitemapVars'); |
| 667 | 667 | if (is_string($typeId)) { |
| 668 | - $typeId = (int)$typeId; |
|
| 668 | + $typeId = (int) $typeId; |
|
| 669 | 669 | } |
| 670 | 670 | // Set the element type in the template |
| 671 | 671 | $elementName = ''; |
@@ -736,7 +736,7 @@ discard block |
||
| 736 | 736 | if ($subSection === 'social') { |
| 737 | 737 | $subSectionSuffix = ' Media'; |
| 738 | 738 | } |
| 739 | - $subSectionTitle = Craft::t('seomatic', ucfirst($subSection) . $subSectionSuffix); |
|
| 739 | + $subSectionTitle = Craft::t('seomatic', ucfirst($subSection).$subSectionSuffix); |
|
| 740 | 740 | // Asset bundle |
| 741 | 741 | try { |
| 742 | 742 | Seomatic::$view->registerAssetBundle(SeomaticAsset::class); |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | $variables['title'] = $templateTitle; |
| 755 | 755 | $variables['subSectionTitle'] = $subSectionTitle; |
| 756 | 756 | $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}"; |
| 757 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 757 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 758 | 758 | $variables['crumbs'] = [ |
| 759 | 759 | [ |
| 760 | 760 | 'label' => $pluginName, |
@@ -762,11 +762,11 @@ discard block |
||
| 762 | 762 | ], |
| 763 | 763 | [ |
| 764 | 764 | 'label' => $templateTitle, |
| 765 | - 'url' => UrlHelper::cpUrl('seomatic/site/identity' . $siteHandleUri), |
|
| 765 | + 'url' => UrlHelper::cpUrl('seomatic/site/identity'.$siteHandleUri), |
|
| 766 | 766 | ], |
| 767 | 767 | [ |
| 768 | 768 | 'label' => $subSectionTitle, |
| 769 | - 'url' => UrlHelper::cpUrl('seomatic/site/' . $subSection . $siteHandleUri), |
|
| 769 | + 'url' => UrlHelper::cpUrl('seomatic/site/'.$subSection.$siteHandleUri), |
|
| 770 | 770 | ], |
| 771 | 771 | ]; |
| 772 | 772 | $variables['selectedSubnavItem'] = 'site'; |
@@ -774,14 +774,14 @@ discard block |
||
| 774 | 774 | |
| 775 | 775 | // Enabled sites |
| 776 | 776 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
| 777 | - $variables['controllerHandle'] = 'site' . '/' . $subSection; |
|
| 777 | + $variables['controllerHandle'] = 'site'.'/'.$subSection; |
|
| 778 | 778 | |
| 779 | 779 | // The site settings for the appropriate meta bundle |
| 780 | 780 | Seomatic::$previewingMetaContainers = true; |
| 781 | 781 | // Get the site to copy the settings from, if any |
| 782 | 782 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
| 783 | 783 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
| 784 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
| 784 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
| 785 | 785 | // Load the metabundle |
| 786 | 786 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
| 787 | 787 | Seomatic::$previewingMetaContainers = false; |
@@ -800,7 +800,7 @@ discard block |
||
| 800 | 800 | $variables['assetVolumeSources'] = AssetHelper::getAssetInputSources(); |
| 801 | 801 | |
| 802 | 802 | // Render the template |
| 803 | - return $this->renderTemplate('seomatic/settings/site/' . $subSection, $variables); |
|
| 803 | + return $this->renderTemplate('seomatic/settings/site/'.$subSection, $variables); |
|
| 804 | 804 | } |
| 805 | 805 | |
| 806 | 806 | /** |
@@ -933,7 +933,7 @@ discard block |
||
| 933 | 933 | $siteId = $this->getSiteIdFromHandle($siteHandle); |
| 934 | 934 | // Enabled sites |
| 935 | 935 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
| 936 | - $variables['controllerHandle'] = 'tracking' . '/' . $subSection; |
|
| 936 | + $variables['controllerHandle'] = 'tracking'.'/'.$subSection; |
|
| 937 | 937 | $variables['currentSubSection'] = $subSection; |
| 938 | 938 | |
| 939 | 939 | // The script meta containers for the global meta bundle |
@@ -941,7 +941,7 @@ discard block |
||
| 941 | 941 | // Get the site to copy the settings from, if any |
| 942 | 942 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
| 943 | 943 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
| 944 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
| 944 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
| 945 | 945 | // Load the metabundle |
| 946 | 946 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
| 947 | 947 | if ($editedMetaBundle) { |
@@ -981,7 +981,7 @@ discard block |
||
| 981 | 981 | $variables['title'] = $templateTitle; |
| 982 | 982 | $variables['subSectionTitle'] = $subSectionTitle; |
| 983 | 983 | $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}"; |
| 984 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 984 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 985 | 985 | $variables['crumbs'] = [ |
| 986 | 986 | [ |
| 987 | 987 | 'label' => $pluginName, |
@@ -993,7 +993,7 @@ discard block |
||
| 993 | 993 | ], |
| 994 | 994 | [ |
| 995 | 995 | 'label' => $subSectionTitle, |
| 996 | - 'url' => UrlHelper::cpUrl('seomatic/tracking/' . $subSection . $siteHandleUri), |
|
| 996 | + 'url' => UrlHelper::cpUrl('seomatic/tracking/'.$subSection.$siteHandleUri), |
|
| 997 | 997 | ], |
| 998 | 998 | ]; |
| 999 | 999 | $variables['selectedSubnavItem'] = 'tracking'; |
@@ -1132,7 +1132,7 @@ discard block |
||
| 1132 | 1132 | if ($siteHandle !== null) { |
| 1133 | 1133 | $site = Craft::$app->getSites()->getSiteByHandle($siteHandle); |
| 1134 | 1134 | if (!$site) { |
| 1135 | - throw new NotFoundHttpException('Invalid site handle: ' . $siteHandle); |
|
| 1135 | + throw new NotFoundHttpException('Invalid site handle: '.$siteHandle); |
|
| 1136 | 1136 | } |
| 1137 | 1137 | $siteId = $site->id; |
| 1138 | 1138 | } else { |
@@ -1168,7 +1168,7 @@ discard block |
||
| 1168 | 1168 | if (!empty($variables['enabledSiteIds'])) { |
| 1169 | 1169 | $siteId = reset($variables['enabledSiteIds']); |
| 1170 | 1170 | } else { |
| 1171 | - $this->requirePermission('editSite:' . $siteId); |
|
| 1171 | + $this->requirePermission('editSite:'.$siteId); |
|
| 1172 | 1172 | } |
| 1173 | 1173 | } |
| 1174 | 1174 | } |
@@ -1188,7 +1188,7 @@ discard block |
||
| 1188 | 1188 | if ($variables['showSites']) { |
| 1189 | 1189 | $variables['sitesMenuLabel'] = Craft::t( |
| 1190 | 1190 | 'site', |
| 1191 | - $sites->getSiteById((int)$variables['currentSiteId'])->name |
|
| 1191 | + $sites->getSiteById((int) $variables['currentSiteId'])->name |
|
| 1192 | 1192 | ); |
| 1193 | 1193 | } else { |
| 1194 | 1194 | $variables['sitesMenuLabel'] = ''; |
@@ -1255,7 +1255,7 @@ discard block |
||
| 1255 | 1255 | $typeId = null |
| 1256 | 1256 | ) { |
| 1257 | 1257 | $variables['textFieldSources'] = array_merge( |
| 1258 | - ['entryGroup' => ['optgroup' => $groupName . ' Fields'], 'title' => 'Title'], |
|
| 1258 | + ['entryGroup' => ['optgroup' => $groupName.' Fields'], 'title' => 'Title'], |
|
| 1259 | 1259 | FieldHelper::fieldsOfTypeFromSource( |
| 1260 | 1260 | $sourceBundleType, |
| 1261 | 1261 | $sourceHandle, |
@@ -1265,7 +1265,7 @@ discard block |
||
| 1265 | 1265 | ) |
| 1266 | 1266 | ); |
| 1267 | 1267 | $variables['assetFieldSources'] = array_merge( |
| 1268 | - ['entryGroup' => ['optgroup' => $groupName . ' Fields']], |
|
| 1268 | + ['entryGroup' => ['optgroup' => $groupName.' Fields']], |
|
| 1269 | 1269 | FieldHelper::fieldsOfTypeFromSource( |
| 1270 | 1270 | $sourceBundleType, |
| 1271 | 1271 | $sourceHandle, |