HEX
Server: nginx/1.27.1
System: Linux in-4 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: ilikadirect (1186)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v6964/gopalak/public_html/wp-content/plugins/restrict-user-access/src/Autoloader.php
<?php

namespace RestrictUserAccess;

/**
 * Class Autoloader
 *
 * @author Joachim Jensen <joachim@dev.institute>
 * @license https://www.gnu.org/licenses/gpl-3.0.html
 */
class Autoloader
{
    public static function init($path)
    {
        $autoloader = $path.'vendor/autoload.php';
        if (!is_readable($autoloader)) {
            self::fail();
            return false;
        }

        require $autoloader;
        return true;
    }

    private static function fail()
    {
        add_action(
            'admin_notices',
            function () {
                echo '<div class="notice notice-error">';
                printf(
                    '<p><b>%s</b></p>',
                    __('Complete your Restrict User Access installation by doing one of the following:', 'restrict-user-access')
                );
                echo '<ul style="list-style: inherit; list-style-position: inside">';
                printf('<li>%s</li>', __('If you cloned via Github, you need to use composer', 'restrict-user-access'));
                printf(
                    '<li><a target="_blank" rel="noopener noreferrer" href="%s">%s</a></li>',
                    'https://wordpress.org/plugins/restrict-user-access/',
                    __('Download and re-install the plugin from wordpress.org', 'restrict-user-access'),
                );
                echo '</ul>';
                echo '</div>';
            }
        );
    }
}