| @@ 68-76 (lines=9) @@ | ||
| 65 | $file = $absolute = $fragment = false; | |
| 66 | ||
| 67 | // Files don't end with / | |
| 68 | 			if ( ! in_array( substr( $rule, - 1 ), array( '\\', '/' ) ) ) { | |
| 69 | $file = true; | |
| 70 | } // If rule starts with a / then treat as absolute path | |
| 71 | 			elseif ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) { | |
| 72 | $absolute = true; | |
| 73 | } // Otherwise treat as dir fragment | |
| 74 | 			else { | |
| 75 | $fragment = true; | |
| 76 | } | |
| 77 | ||
| 78 | // Strip $this->root and conform | |
| 79 | $rule = str_ireplace( Path::get_root(), '', untrailingslashit( wp_normalize_path( $rule ) ) ); | |
| @@ 126-138 (lines=13) @@ | ||
| 123 | $file = $absolute = $fragment = false; | |
| 124 | ||
| 125 | // Files don't end with / | |
| 126 | 			if ( ! in_array( substr( $rule, - 1 ), array( '\\', '/' ) ) ) { | |
| 127 | $file = true; | |
| 128 | } | |
| 129 | ||
| 130 | // If rule starts with a / then treat as absolute path | |
| 131 | 			elseif ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) { | |
| 132 | $absolute = true; | |
| 133 | } | |
| 134 | ||
| 135 | // Otherwise treat as dir fragment | |
| 136 | 			else { | |
| 137 | $fragment = true; | |
| 138 | } | |
| 139 | ||
| 140 | $rule = str_ireplace( Path::get_root(), '', untrailingslashit( wp_normalize_path( $rule ) ) ); | |
| 141 | ||