PluginProbe
Redirection / 2.9
Redirection v2.9
5.10.0 5.9.0 5.8.1 5.8.0 3.7.2 3.7.3 4.0 4.0.1 4.1 4.1.1 4.2 4.2.1 4.2.2 4.2.3 4.3 4.3.1 4.3.2 4.3.3 4.4 4.4.1 4.4.2 4.5 4.5.1 4.6.2 4.7.1 All 130 releases
← All changes | actions/pass.php +14 -3 4.02.9 View file →
@@ -4,11 +4,8 @@
4 4 public function process_external( $url ) {
5 5 echo @wp_remote_fopen( $url );
6 6 }
7 7
8 - /**
9 - * This is deprecated and will be removed in a future version
10 - */
11 8 public function process_file( $url ) {
12 9 $parts = explode( '?', substr( $url, 7 ) );
13 10
14 11 if ( count( $parts ) > 1 ) {
@@ -46,13 +43,27 @@
46 43 public function is_external( $target ) {
47 44 return substr( $target, 0, 7 ) === 'http://' || substr( $target, 0, 8 ) === 'https://';
48 45 }
49 46
47 + public function is_file( $target ) {
48 + return substr( $target, 0, 7 ) === 'file://';
49 + }
50 +
50 51 public function process_before( $code, $target ) {
51 52 // External target
52 53 if ( $this->is_external( $target ) ) {
53 54 $this->process_external( $target );
54 55 exit();
56 + }
57 +
58 + // file:// targetw
59 + if ( $this->is_file( $target ) ) {
60 + if ( defined( 'REDIRECTION_SUPPORT_PASS_FILE' ) && REDIRECTION_SUPPORT_PASS_FILE ) {
61 + $this->process_file( $target );
62 + exit();
63 + }
64 +
65 + return;
55 66 }
56 67
57 68 return $this->process_internal( $target );
58 69 }