Completed
Push — BaseComponent-BlockCookieNotif... ( 6e3017...aed0cd )
by
unknown
02:31
created

functions.php ➔ init()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Flynt\Features\GoogleAnalytics;
4
5
require_once __DIR__ . '/GoogleAnalytics.php';
6
7
use Flynt\Features\GoogleAnalytics\GoogleAnalytics;
8
use Flynt\Utils\Feature;
9
use Flynt\Features\Acf\OptionPages;
10
11
add_action('init', 'Flynt\Features\GoogleAnalytics\init', 100);
12
13
function init()
14
{
15
    $googleAnalyticsOptions = OptionPages::get('globalOptions', 'feature', 'GoogleAnalytics');
16
    if ($googleAnalyticsOptions) {
17
        new GoogleAnalytics($googleAnalyticsOptions);
18
    }
19
}
20