| Server IP : 146.59.209.152 / Your IP : 216.73.216.152 Web Server : Apache System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : monpetu ( 144298) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/monpetu/www/ipprint/wp-content/plugins/surerank/inc/lib/ |
Upload File : |
<?php
/**
* Init
*
* Loads latest UTM Analytics library in environment.
*
* @since 1.0.0
* @package UTM Analytics
*/
namespace SureRank\Inc\Lib;
use SureRank\Inc\Traits\Get_Instance;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'Surerank_Utm_Analytics' ) ) :
/**
* Admin
*/
class Surerank_Utm_Analytics {
use Get_Instance;
/**
* Constructor.
*
* @since 1.0.0
*/
private function __construct() {
$this->version_check();
add_action( 'init', [ $this, 'load' ], 999 );
}
/**
* Version Check
*
* @return void
*/
public function version_check() {
$file = realpath( dirname( __FILE__ ) . '/utm-analytics/version.json' );
// Is file exist?
if ( is_file( $file ) ) {
// @codingStandardsIgnoreStart
$file_data = json_decode( file_get_contents( $file ), true );
// @codingStandardsIgnoreEnd
global $utm_analytics_version, $utm_analytics_init;
$path = realpath( dirname( __FILE__ ) . '/utm-analytics/bsf-utm-analytics.php' );
$version = isset( $file_data['bsf-utm-analytics'] ) ? $file_data['bsf-utm-analytics'] : 0;
if ( null === $utm_analytics_version ) {
$utm_analytics_version = '0.0.1';
}
// Compare versions.
if ( version_compare( $version, $utm_analytics_version, '>=' ) ) {
$utm_analytics_version = $version;
$utm_analytics_init = $path;
}
}
}
/**
* Load latest plugin
*
* @return void
*/
public function load() {
global $utm_analytics_version, $utm_analytics_init;
if ( is_file( realpath( $utm_analytics_init ) ) ) {
include_once realpath( $utm_analytics_init );
}
}
}
endif;