文件操作 - url.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/steemteam/public_html/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 ) { 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' ); } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件