[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: util.php
<?php namespace ShopEngine\Utils; defined( 'ABSPATH' ) || exit; /** * Global helper class. * * @since 1.0.0 */ class Util{ public static $instance = null; private static $key = 'shopengine_options'; public static function get_option( $key, $default = '' ) { $data_all = get_option( self::$key ); return ( isset( $data_all[ $key ] ) && $data_all[ $key ] != '' ) ? $data_all[ $key ] : $default; } public static function save_option( $key, $value = '' ) { $data_all = get_option( self::$key ); $data_all[ $key ] = $value; return update_option( self::$key, $data_all ); } public static function get_settings( $key, $default = '' ) { $data_all = self::get_option( 'settings', array() ); return ( isset( $data_all[ $key ] ) && $data_all[ $key ] != '' ) ? $data_all[ $key ] : $default; } public static function save_settings( $new_data = '' ) { $data_old = self::get_option( 'settings', array() ); $data = array_merge( $data_old, $new_data ); return self::save_option( 'settings', $data ); } public static function shopengine_admin_action() { $status = ''; // Check for nonce security if (!isset($_POST['nonce']) || ! wp_verify_nonce( sanitize_text_field( wp_unslash($_POST['nonce']) ) ) ) { return; } // manage capability check if ( ! current_user_can( 'manage_options' ) ) { return; } if ( isset( $_POST['settings'] ) ) { $status = self::save_settings( empty( $_POST['settings'] ) ? array() : map_deep( wp_unslash( $_POST['settings'] ) , 'sanitize_text_field' ) ); } if(trim($status)){ wp_send_json_success(); }else{ wp_send_json_error(); } exit; } public static function instance() { if ( is_null( self::$instance ) ) { // Fire the class instance self::$instance = new self(); } return self::$instance; } public static function banner_consent(){ include_once "user-consent-banner/consent-check-view.php"; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium171.web-hosting.com
Server IP: 162.0.209.115
PHP Version: 8.0.30
Server Software: LiteSpeed
System: Linux premium171.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 71.28 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: aircyknj
User ID (UID): 2056
Group ID (GID): 2052
Script Owner UID: 2056
Current Dir Owner: 2056