Server IP : 172.67.158.161 / Your IP : 3.12.161.6 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/giankuin/dietcontrungnhanh.com/wp-content/plugins/ithemes-security-pro/pro/fingerprinting/ |
Upload File : |
<?php use iThemesSecurity\User_Groups\Upgrader; class ITSEC_Fingerprinting_Setup { public function __construct() { add_action( 'itsec_modules_do_plugin_upgrade', array( $this, 'execute_upgrade' ) ); } /** * Execute module upgrade * * @param int $itsec_old_version * * @return void */ public function execute_upgrade( $itsec_old_version ) { if ( $itsec_old_version < 4117 ) { $upgrader = ITSEC_Modules::get_container()->get( Upgrader::class ); ITSEC_Modules::set_setting( 'fingerprinting', 'group', $upgrader->upgrade_from_min_role( ITSEC_Modules::get_setting( 'fingerprinting', 'role' ) ?: 'subscriber' ) ); } if ( $itsec_old_version < 4123 ) { $fingerprinting = ITSEC_Modules::get_settings( 'fingerprinting' ); $geolocation = [ 'mapbox_access_token' => $fingerprinting['mapbox_access_token'] ?? '', 'mapquest_api_key' => $fingerprinting['mapquest_api_key'] ?? '', ]; $geolocation['maxmind_lite'] = [ 'key' => $fingerprinting['maxmind_lite_key'] ?? '', ]; $geolocation['maxmind_api'] = [ 'user' => $fingerprinting['maxmind_api_user'] ?? '', 'key' => $fingerprinting['maxmind_api_key'] ?? '', ]; if ( $geolocation ) { ITSEC_Modules::set_settings( 'geolocation', $geolocation ); } ITSEC_Modules::set_settings( 'fingerprinting', array_diff_key( $fingerprinting, [ 'maxmind_lite_key', 'maxmind_api_user', 'maxmind_api_key', 'mapbox_access_token', 'mapquest_api_key' ] ) ); } } } new ITSEC_Fingerprinting_Setup();