??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/monicslandscape.co.uk/wp-content/themes/astra/inc/lib/class-astra-nps-survey.php
⬅ Kembali
<?php
/**
* Init
*
* @since 1.0.0
* @package NPS Survey
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'Astra_Nps_Survey' ) ) {
/**
* Admin
*/
class Astra_Nps_Survey {
/**
* Instance
*
* @since 1.0.0
* @var (Object) Astra_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() {
// Allow users to disable NPS survey via a filter.
if ( apply_filters( 'astra_nps_survey_disable', false ) ) {
return;
}
$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 ) ) {
// @codingStandardsIgnoreStart
$file_data = json_decode( file_get_contents( $file ), true );
// @codingStandardsIgnoreEnd
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
*/
Astra_Nps_Survey::get_instance();
}
Nama
Tipe
Ukuran
Diubah
Aksi
📁 astra-notices
dir
—
2026-06-09 10:06
📁 batch-processing
dir
—
2026-06-09 10:06
📁 bsf-analytics
dir
—
2026-06-09 10:06
📁 docs
dir
—
2026-06-09 10:06
📁 nps-survey
dir
—
2026-06-09 10:06
📁 webfont
dir
—
2026-06-09 10:06
🐘 class-astra-nps-notice.php
php
3.8 KB
2025-10-07 13:33
🐘 class-astra-nps-survey.php
php
2 KB
2025-02-26 11:35