Elementor\System_Info\Main::download_file PHP Метод

download_file() публичный Метод

public download_file ( )
    public function download_file()
    {
        if (!current_user_can($this->capability)) {
            wp_die(__('You don\'t have a permission to download this file', 'elementor'));
        }
        $reports_info = self::get_allowed_reports();
        $reports = $this->load_reports($reports_info);
        header('Content-Type: text/plain');
        header('Content-Disposition:attachment; filename=system-info-' . $_SERVER['HTTP_HOST'] . '-' . date('d-m-Y') . '.txt');
        $this->print_report($reports);
        die;
    }