HEX
Server: Apache/2
System: Linux server1c 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64
User: jandjware (1008)
PHP: 8.2.23
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/jandjware/public_html/wp-content/plugins/hostinger/includes/Admin/Redirects.php
<?php

namespace Hostinger\Admin;

use Hostinger\Settings;

defined( 'ABSPATH' ) || exit;

class Redirects {
    private string $platform;
    public const PLATFORM_HPANEL = 'hpanel';

    public function __construct() {

        if ( ! Settings::get_setting( 'first_login_at' ) ) {
            Settings::update_setting( 'first_login_at', gmdate( 'Y-m-d H:i:s' ) );
        }
        /** PHPCS:disable WordPress.Security.NonceVerification.Recommended */
        if ( ! isset( $_GET['platform'] ) ) {
            return;
        }

        $this->platform = sanitize_text_field( $_GET['platform'] );
        $this->login_redirect();
        /** PHPCS:enable */
    }

    public function login_redirect(): void {
        if ( $this->platform === self::PLATFORM_HPANEL ) {
            add_action(
                'init',
                static function () {
                    $redirect_url = admin_url( 'admin.php?page=hostinger' );
                    wp_safe_redirect( $redirect_url );
                    exit;
                }
            );
        }
    }
}