403Webshell
Server IP : 145.239.37.162  /  Your IP : 216.73.217.74
Web Server : Apache
System : Linux webm003.cluster130.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 : verseaa ( 38250)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/verseaa/www2024/wp-content/plugins/query-monitor/collectors/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/verseaa/www2024/wp-content/plugins/query-monitor/collectors/redirects.php
<?php declare(strict_types = 1);
/**
 * HTTP redirect collector.
 *
 * @package query-monitor
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * @extends QM_DataCollector<QM_Data_Redirect>
 */
class QM_Collector_Redirects extends QM_DataCollector {

	public $id = 'redirects';

	public function get_storage(): QM_Data {
		return new QM_Data_Redirect();
	}

	/**
	 * @return void
	 */
	public function set_up() {
		parent::set_up();
		add_filter( 'wp_redirect', array( $this, 'filter_wp_redirect' ), 9999, 2 );
	}

	/**
	 * @return void
	 */
	public function tear_down() {
		remove_filter( 'wp_redirect', array( $this, 'filter_wp_redirect' ), 9999 );

		parent::tear_down();
	}

	/**
	 * @param string $location
	 * @param int $status
	 * @return string
	 */
	public function filter_wp_redirect( $location, $status ) {

		if ( ! $location ) {
			return $location;
		}

		$trace = new QM_Backtrace( array(
			'ignore_hook' => array(
				current_filter() => true,
			),
			'ignore_func' => array(
				'wp_redirect' => true,
			),
		) );

		$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() );

Youez - 2016 - github.com/yon3zu
LinuXploit