Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets.corals.io/wp-content/plugins/redirection/actions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets.corals.io/wp-content/plugins/redirection/actions/url.php
<?php

/**
 * URL action - redirect to a URL
 */
class Url_Action extends Red_Action {
	/**
	 * Redirect to a URL
	 *
	 * @param string $target Target URL.
	 * @return void
	 */
	protected function redirect_to( $target ) {
		// This is a known redirect, possibly extenal
		// phpcs:ignore
		$redirect = wp_redirect( $target, $this->get_code(), 'redirection' );

		if ( $redirect ) {
			/** @psalm-suppress InvalidGlobal */
			global $wp_version;

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

			die();
		}
	}

	/**
	 * Run this action. May not return from this function.
	 *
	 * @return void
	 */
	public function run() {
		$target = $this->get_target();

		if ( $target !== null ) {
			$this->redirect_to( $target );
		}
	}

	/**
	 * Does this action need a target?
	 *
	 * @return boolean
	 */
	public function needs_target() {
		return true;
	}

	public function name() {
		return __( 'Redirect to URL', 'redirection' );
	}
}

Spamworldpro Mini