HEX
Server: Apache
System: Linux webm003.cluster111.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: assotraipi (849654)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/assotraipi/www/wp-content/plugins/download-monitor/src/DownloadNoAccessPageEndpoint.php
<?php
/**
 * Download No Access Page Endpoint
 *
 * @package     DLM
 * @subpackage  Classes/Endpoints
 * @since       1.0
 */
if ( ! class_exists('DLM_Download_No_Access_Page_Endpoint')) {
    class DLM_Download_No_Access_Page_Endpoint
    {

        /**
         * Endpoint name
         *
         * @var string
         */
        private $endpoint = 'download-id';

        /**
         * Setup no access page
         */
        public function setup()
        {
            // add query var and enpoint
            add_filter('query_vars', array($this, 'add_query_vars'), 0);
            add_action('init', array($this, 'add_endpoint'), 0);
        }

        /**
         * add_query_vars function.
         *
         * @access public
         *
         * @param  array  $vars
         *
         * @return array
         */
        public function add_query_vars($vars)
        {
            $vars[] = $this->endpoint;

            return $vars;
        }

        /**
         * add_endpoint function.
         *
         * @access public
         * @return void
         */
        public function add_endpoint()
        {
            add_rewrite_endpoint($this->endpoint, EP_ALL);
        }
    }
}