@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phpmyadmin-ubuntu-m-2vcpu-16gb-blr1-01 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Current Path :
/
var
/
www
/
html
/
-wp-content
/
plugins
/
query-monitor
/
collectors
/
Path :
Upload File :
New :
File
Dir
/var/www/html/-wp-content/plugins/query-monitor/collectors/redirects.php
<?php /** * HTTP redirect collector. * * @package query-monitor */ class QM_Collector_Redirects extends QM_Collector { public $id = 'redirects'; public function __construct() { parent::__construct(); add_filter( 'wp_redirect', array( $this, 'filter_wp_redirect' ), 9999, 2 ); } public function filter_wp_redirect( $location, $status ) { if ( ! $location ) { return $location; } $trace = new QM_Backtrace(); $this->data['trace'] = $trace; $this->data['location'] = $location; $this->data['status'] = $status; return $location; } } # Load early in case a plugin is doing a redirect when it initialises instead of after the `plugins_loaded` hook QM_Collectors::add( new QM_Collector_Redirects() );