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 | matches/url.php +4 -4 4.02.9 View file →
@@ -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;