| Server IP : 104.21.74.147 / Your IP : 216.73.217.154 Web Server : nginx/1.24.0 System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/rebeccaone.com/wp-content/plugins/convertplug/lib/ |
Upload File : |
<?php
/**
* UAE.
*
* @package UAE
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'Convertplug_Nps_Survey' ) ) :
/**
* Admin
*/
class Convertplug_Nps_Survey {
/**
* Instance
*
* @since 1.0.0
* @var (Object) Convertplug_Nps_Survey
*/
private static $instance = null;
/**
* Get Instance
*
* @since 1.0.0
*
* @return object Class object.
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Constructor.
*
* @since 1.0.0
*/
private function __construct() {
$this->version_check();
add_action( 'init', array( $this, 'load' ), 999 );
}
/**
* Version Check
*
* @return void
*/
public function version_check() {
$file = realpath( dirname( __FILE__ ) . '/nps-survey/version.json' );
// Is file exist?
if ( is_file( $file ) ) {
$file_data = json_decode( file_get_contents( $file ), true ); //phpcs:ignore WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown
global $nps_survey_version, $nps_survey_init;
$path = realpath( dirname( __FILE__ ) . '/nps-survey/nps-survey.php' );
$version = isset( $file_data['nps-survey'] ) ? $file_data['nps-survey'] : 0;
if ( null === $nps_survey_version ) {
$nps_survey_version = '1.0.0';
}
// Compare versions.
if ( version_compare( $version, $nps_survey_version, '>=' ) ) {
$nps_survey_version = $version;
$nps_survey_init = $path;
}
}
}
/**
* Load latest plugin
*
* @return void
*/
public function load() {
global $nps_survey_version, $nps_survey_init;
if ( is_file( realpath( $nps_survey_init ) ) ) {
include_once realpath( $nps_survey_init );
}
}
}
/**
* Kicking this off by calling 'get_instance()' method
*/
Convertplug_Nps_Survey::get_instance();
endif;