| 926 | | } else if ( |
| 927 | | ! isset( $site_url['path'] ) && |
| 928 | | ( ! isset( $src_url['host'] ) || $src_url['host'] !== $site_url['host'] ) |
| 929 | | ) { |
| 930 | | $relative = trim( $src_url['path'], '/' ); |
| 931 | | } else if ( |
| 932 | | ( strpos( $src_url['path'], $site_url['path'] ) === 0 ) && |
| 933 | | ( ! isset( $src_url['host'] ) || $src_url['host'] !== $site_url['host'] ) |
| 934 | | ) { |
| 935 | | // Make the src relative to the WP root. |
| 936 | | $relative = substr( $src, strlen( $site_url['path'] ) ); |
| 937 | | $relative = trim( $relative, '/' ); |
| | 926 | } else if ( ! isset( $src_url['host'] ) || $src_url['host'] !== $site_url['host'] ) { |
| | 927 | if ( ! isset( $site_url['path'] ) ) { |
| | 928 | $relative = trim( $src_url['path'], '/' ); |
| | 929 | } else if ( ( strpos( $src_url['path'], $site_url['path'] ) === 0 ) ) { |
| | 930 | // Make the src relative to the WP root. |
| | 931 | $relative = substr( $src, strlen( $site_url['path'] ) ); |
| | 932 | $relative = trim( $relative, '/' ); |
| | 933 | } |