|
@@ 1407-1409 (lines=3) @@
|
| 1404 |
|
if ( ! in_array( substr( $rule, - 1 ), array( '\\', '/' ) ) ) { |
| 1405 |
|
$file = true; |
| 1406 |
|
} // If rule starts with a / then treat as absolute path |
| 1407 |
|
elseif ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) { |
| 1408 |
|
$absolute = true; |
| 1409 |
|
} // Otherwise treat as dir fragment |
| 1410 |
|
else { |
| 1411 |
|
$fragment = true; |
| 1412 |
|
} |
|
@@ 1418-1420 (lines=3) @@
|
| 1415 |
|
$rule = str_ireplace( $this->get_root(), '', untrailingslashit( wp_normalize_path( $rule ) ) ); |
| 1416 |
|
|
| 1417 |
|
// Strip the preceeding slash |
| 1418 |
|
if ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) { |
| 1419 |
|
$rule = substr( $rule, 1 ); |
| 1420 |
|
} |
| 1421 |
|
|
| 1422 |
|
// Escape string for regex |
| 1423 |
|
if ( $context === 'regex' ) { |