| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | class URL_Match extends Red_Match { |
| 4 | 4 | public $url = false; |
| 5 | 5 | |
| 6 | - function name() { | |
| 6 | + function name () { | |
| 7 | 7 | return __( 'URL only', 'redirection' ); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | public function save( array $details, $no_target_url = false ) { |
| @@ -20,12 +20,12 @@ | ||
| 20 | 20 | |
| 21 | 21 | return $this->sanitize_url( $data ); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - function get_target( $requested_url, $source_url, Red_Source_Flags $flags ) { | |
| 24 | + function get_target( $url, $matched_url, $regex ) { | |
| 25 | 25 | $target = $this->url; |
| 26 | - if ( $flags->is_regex() ) { | |
| 27 | - $target = $this->get_target_regex_url( $source_url, $target, $requested_url, $flags ); | |
| 26 | + if ( $regex ) { | |
| 27 | + $target = $this->get_target_regex_url( $matched_url, $this->url, $url ); | |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | if ( $target === '' ) { |
| 31 | 31 | return $matched_url; |