| Server IP : 219.234.31.115 / Your IP : 216.73.217.134 Web Server : Apache System : Linux ebs-140924 5.10.0-30-amd64 #1 SMP Debian 5.10.218-1 (2024-06-01) x86_64 User : vndaystarftp ( 67432) PHP Version : 7.3.33 Disable Function : link,symlink,passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server,pcntl_fork,pcntl_rfork MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/wwwroot/vndaystarftp/wwwroot/wp-content/plugins/auxin-pro-tools/admin/ |
Upload File : |
<?php
/**
* Main Admin Class
*
* @echo HEADER
*/
// no direct access allowed
if ( ! defined( 'ABSPATH' ) ) {
die();
}
/**
* This class is used to work with the
* administrative side of the plugin
*/
class AUXPRO_Admin {
/**
* Instance of this class.
*
* @since 1.0.0
*
* @var object
*/
protected static $instance = null;
/**
* Slug of the plugin screen.
*
* @since 1.0.0
*
* @var string
*/
protected $screen_hook_suffix = null;
/**
* Initialize the plugin by loading admin classes and functions
*
* @since 1.0.0
*/
private function __construct() {
// include admin files
$this->includes();
$this->enqueue_admin_scripts();
}
/**
* Include admin essential classes and functions
*
* @return void
*/
private function includes(){
include_once( AUXPRO_ADMIN_DIR . '/includes/index.php' );
}
/**
* Return an instance of this class.
*
* @since 1.0.0
*
* @return object A single instance of this class.
*/
public static function get_instance() {
if( apply_filters( 'auxpro_access_only_for_super_admins' , 0 ) && ! is_super_admin() ) {
return;
}
// If the single instance hasn't been set, set it now.
if ( null == self::$instance ) {
self::$instance = new self;
}
return self::$instance;
}
/**
* Register and enqueue admin-specific JavaScript & Stylesheet.
*
* @since 1.0.0
*
* @return null Return early if no settings page is registered.
*/
public function enqueue_admin_scripts() {
$admin_assets = new AUXPRO_Admin_Assets();
if ( ! isset( $this->screen_hook_suffix ) )
return;
$screen = get_current_screen();
if ( $this->screen_hook_suffix == $screen->id ) {
// enqueue styles on the pages that belongs to plugin
}
}
}
return AUXPRO_Admin::get_instance();