Upload:

Command:

logicielcomptabilite@18.224.252.162: ~ $
<?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' );
	}
}

Filemanager

Name Type Size Permission Actions
error.php File 1.24 KB 0644
nothing.php File 475 B 0644
pass.php File 1.89 KB 0644
random.php File 910 B 0644
url.php File 992 B 0644