public static function ajax_downloadLogFile_callback() { if (!isset($_GET['logfile'])) { status_header(400); nocache_headers(); exit; } wfErrorLogHandler::outputErrorLog($_GET['logfile']); //exits }
</tr> </tbody> <tbody class="thead"> <tr> <th colspan="2">Log Files (Error messages from WordPress core, plugins, and themes)</th> </tr> </tbody> <tbody class="thead thead-subhead" style="font-size: 85%"> <tr> <th>File</th> <th>Download</th> </tr> </tbody> <tbody style="font-size: 85%"> <?php $errorLogs = wfErrorLogHandler::getErrorLogs(); if (count($errorLogs) < 1) { ?> <tr> <td colspan="2"><em>No log files found.</em></td> </tr> <?php } else { foreach ($errorLogs as $log => $readable) { ?> <tr> <td style="width: 100%"><?php echo esc_html($log) . ' (' . wfUtils::formatBytes(filesize($log)) . ')'; ?> </td> <td style="white-space: nowrap; text-align: right;"><?php