HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: /virtual/nagasaki/public_html/wp-content/plugins/redirection/actions/url.php
<?php

class Url_Action extends Red_Action {
	protected function redirect_to( $code, $target ) {
		add_filter( 'x_redirect_by', [ $this, 'x_redirect_by' ] );

		$redirect = wp_redirect( $target, $code );

		if ( $redirect ) {
			global $wp_version;

			if ( version_compare( $wp_version, '5.1', '<' ) ) {
				header( 'X-Redirect-Agent: redirection' );
			}

			die();
		}
	}

	public function process_after( $code, $target ) {
		$this->redirect_to( $code, $target );
	}

	public function needs_target() {
		return true;
	}

	public function x_redirect_by() {
		return 'redirection';
	}
}