@@ -53,7 +53,7 @@ |
||
53 | 53 | $html = ''; |
54 | 54 | |
55 | 55 | // Don't allow the preview to be accessed publicly |
56 | - $this->requireAuthorization(Seomatic::SEOMATIC_PREVIEW_AUTHORIZATION_KEY . $elementId); |
|
56 | + $this->requireAuthorization(Seomatic::SEOMATIC_PREVIEW_AUTHORIZATION_KEY.$elementId); |
|
57 | 57 | |
58 | 58 | /** @var Element $element */ |
59 | 59 | $element = Craft::$app->getElements()->getElementById($elementId, null, $siteId); |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | Event::on( |
394 | 394 | Plugins::class, |
395 | 395 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
396 | - function (PluginEvent $event) { |
|
396 | + function(PluginEvent $event) { |
|
397 | 397 | if ($event->plugin === $this) { |
398 | 398 | // Invalidate our caches after we've been installed |
399 | 399 | $this->clearAllCaches(); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | Event::on( |
415 | 415 | ClearCaches::class, |
416 | 416 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
417 | - function (RegisterCacheOptionsEvent $event) { |
|
417 | + function(RegisterCacheOptionsEvent $event) { |
|
418 | 418 | Craft::debug( |
419 | 419 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
420 | 420 | __METHOD__ |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | Event::on( |
431 | 431 | Plugins::class, |
432 | 432 | Plugins::EVENT_BEFORE_SAVE_PLUGIN_SETTINGS, |
433 | - function (PluginEvent $event) { |
|
433 | + function(PluginEvent $event) { |
|
434 | 434 | if ($event->plugin === $this && !Craft::$app->getDb()->getSupportsMb4()) { |
435 | 435 | // For all the emojis |
436 | 436 | $settingsModel = $this->getSettings(); |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | Event::on( |
461 | 461 | Plugins::class, |
462 | 462 | Plugins::EVENT_AFTER_LOAD_PLUGINS, |
463 | - function () { |
|
463 | + function() { |
|
464 | 464 | // Install these only after all other plugins have loaded |
465 | 465 | $request = Craft::$app->getRequest(); |
466 | 466 | // Allow the SeoElements to register their own event handlers |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | Event::on( |
480 | 480 | Fields::class, |
481 | 481 | Fields::EVENT_REGISTER_FIELD_TYPES, |
482 | - function (RegisterComponentTypesEvent $event) { |
|
482 | + function(RegisterComponentTypesEvent $event) { |
|
483 | 483 | $event->types[] = SeoSettingsField::class; |
484 | 484 | $event->types[] = Seomatic_MetaField::class; |
485 | 485 | } |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | Event::on( |
489 | 489 | TemplateCaches::class, |
490 | 490 | TemplateCaches::EVENT_AFTER_DELETE_CACHES, |
491 | - function (DeleteTemplateCachesEvent $event) { |
|
491 | + function(DeleteTemplateCachesEvent $event) { |
|
492 | 492 | self::$plugin->metaContainers->invalidateCaches(); |
493 | 493 | } |
494 | 494 | ); |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | Event::on( |
497 | 497 | Elements::class, |
498 | 498 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
499 | - function (ElementEvent $event) { |
|
499 | + function(ElementEvent $event) { |
|
500 | 500 | Craft::debug( |
501 | 501 | 'Elements::EVENT_AFTER_SAVE_ELEMENT', |
502 | 502 | __METHOD__ |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | Event::on( |
517 | 517 | Elements::class, |
518 | 518 | Elements::EVENT_AFTER_DELETE_ELEMENT, |
519 | - function (ElementEvent $event) { |
|
519 | + function(ElementEvent $event) { |
|
520 | 520 | Craft::debug( |
521 | 521 | 'Elements::EVENT_AFTER_DELETE_ELEMENT', |
522 | 522 | __METHOD__ |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | Event::on( |
535 | 535 | Entry::class, |
536 | 536 | Entry::EVENT_REGISTER_PREVIEW_TARGETS, |
537 | - function (RegisterPreviewTargetsEvent $e) { |
|
537 | + function(RegisterPreviewTargetsEvent $e) { |
|
538 | 538 | /** @var Element $element */ |
539 | 539 | $element = $e->sender; |
540 | 540 | $e->previewTargets[] = [ |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | ]), |
546 | 546 | ]; |
547 | 547 | // Don't allow the preview to be accessed publicly |
548 | - Craft::$app->getSession()->authorize(self::SEOMATIC_PREVIEW_AUTHORIZATION_KEY . $element->id); |
|
548 | + Craft::$app->getSession()->authorize(self::SEOMATIC_PREVIEW_AUTHORIZATION_KEY.$element->id); |
|
549 | 549 | } |
550 | 550 | ); |
551 | 551 | } |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | Event::on( |
573 | 573 | UrlManager::class, |
574 | 574 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
575 | - function (RegisterUrlRulesEvent $event) { |
|
575 | + function(RegisterUrlRulesEvent $event) { |
|
576 | 576 | Craft::debug( |
577 | 577 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
578 | 578 | __METHOD__ |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | Event::on( |
598 | 598 | UrlManager::class, |
599 | 599 | UrlManager::EVENT_REGISTER_CP_URL_RULES, |
600 | - function (RegisterUrlRulesEvent $event) { |
|
600 | + function(RegisterUrlRulesEvent $event) { |
|
601 | 601 | Craft::debug( |
602 | 602 | 'UrlManager::EVENT_REGISTER_CP_URL_RULES', |
603 | 603 | __METHOD__ |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | Event::on( |
614 | 614 | UserPermissions::class, |
615 | 615 | UserPermissions::EVENT_REGISTER_PERMISSIONS, |
616 | - function (RegisterUserPermissionsEvent $event) { |
|
616 | + function(RegisterUserPermissionsEvent $event) { |
|
617 | 617 | Craft::debug( |
618 | 618 | 'UserPermissions::EVENT_REGISTER_PERMISSIONS', |
619 | 619 | __METHOD__ |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | Event::on( |
636 | 636 | View::class, |
637 | 637 | View::EVENT_BEGIN_BODY, |
638 | - function () { |
|
638 | + function() { |
|
639 | 639 | Craft::debug( |
640 | 640 | 'View::EVENT_BEGIN_BODY', |
641 | 641 | __METHOD__ |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | Event::on( |
651 | 651 | View::class, |
652 | 652 | View::EVENT_END_BODY, |
653 | - function () { |
|
653 | + function() { |
|
654 | 654 | Craft::debug( |
655 | 655 | 'View::EVENT_END_BODY', |
656 | 656 | __METHOD__ |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | Event::on( |
666 | 666 | View::class, |
667 | 667 | View::EVENT_END_PAGE, |
668 | - function () { |
|
668 | + function() { |
|
669 | 669 | Craft::debug( |
670 | 670 | 'View::EVENT_END_PAGE', |
671 | 671 | __METHOD__ |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | // Don't cache Control Panel requests |
689 | 689 | self::$cacheDuration = 1; |
690 | 690 | // Prefix the Control Panel title |
691 | - self::$view->hook('cp.layouts.base', function (&$context) { |
|
691 | + self::$view->hook('cp.layouts.base', function(&$context) { |
|
692 | 692 | if (self::$devMode) { |
693 | 693 | $context['docTitle'] = self::$settings->devModeCpTitlePrefix.$context['docTitle']; |
694 | 694 | } else { |