|
@@ -9,7 +9,7 @@ discard block |
|
|
block discarded – undo |
|
9
|
9
|
use Flynt\Utils\TwigExtensionFlynt; |
|
10
|
10
|
use Timber\Timber; |
|
11
|
11
|
|
|
12
|
|
-add_filter('Flynt/addComponentData?name=FeatureGoogleAnalytics', function ($data) { |
|
|
12
|
+add_filter('Flynt/addComponentData?name=FeatureGoogleAnalytics', function($data) { |
|
13
|
13
|
$googleAnalyticsOptions = Options::getGlobal('GoogleAnalytics'); |
|
14
|
14
|
|
|
15
|
15
|
if ($googleAnalyticsOptions) { |
|
@@ -38,7 +38,7 @@ discard block |
|
|
block discarded – undo |
|
38
|
38
|
]); |
|
39
|
39
|
} |
|
40
|
40
|
|
|
41
|
|
-add_action('wp_footer', function () { |
|
|
41
|
+add_action('wp_footer', function() { |
|
42
|
42
|
$loader = new Loader(); |
|
43
|
43
|
$env = $loader->get_twig(); |
|
44
|
44
|
$twig = new TwigExtensionFlynt(); |
|
@@ -46,7 +46,7 @@ discard block |
|
|
block discarded – undo |
|
46
|
46
|
echo $twig->renderComponent($env, $context, 'FeatureGoogleAnalytics'); |
|
47
|
47
|
}); |
|
48
|
48
|
|
|
49
|
|
-add_filter('Flynt/thirdPartyCookies', function ($features) { |
|
|
49
|
+add_filter('Flynt/thirdPartyCookies', function($features) { |
|
50
|
50
|
$googleAnalyticsTranslatableOptions = Options::getTranslatable('GoogleAnalytics'); |
|
51
|
51
|
|
|
52
|
52
|
$features = array_merge($features, [ |
Please login to merge, or discard this patch.