HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux bsx-1-dev 6.8.0-101-generic #101-Ubuntu SMP PREEMPT_DYNAMIC Mon Feb 9 10:15:05 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/memberpress/app/controllers/MeprAccountLoginCtrl.php
<?php

if (!defined('ABSPATH')) {
    die('You are not allowed to call this page directly.');
}

class MeprAccountLoginCtrl extends MeprBaseCtrl
{
    /**
     * Loads the hooks.
     *
     * @return void
     */
    public function load_hooks()
    {
        add_filter('submenu_file', [$this, 'highlight_menu_item']);
    }

    /**
     * Highlights the menu item.
     *
     * @param  string $submenu_file The submenu file.
     * @return string
     */
    public function highlight_menu_item($submenu_file)
    {
        global $current_screen;

        // Remove the "Account Login" menu item on all pages.
        remove_submenu_page('memberpress', 'memberpress-account-login');

        // Set the highlighted menu item to "Settings".
        if ($current_screen instanceof WP_Screen && $current_screen->id === 'memberpress_page_memberpress-account-login') {
            $submenu_file = 'memberpress-options';
        }

        return $submenu_file;
    }

    /**
     * Routes the request.
     *
     * @return void
     */
    public static function route()
    {
        $account_email = get_option('mepr_authenticator_account_email');
        $secret        = get_option('mepr_authenticator_secret_token');
        $site_uuid     = get_option('mepr_authenticator_site_uuid');

        MeprView::render('/admin/account-login/ui', get_defined_vars());
    }
}