@@ 131-133 (lines=3) @@ | ||
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 { |
|
@@ 143-145 (lines=3) @@ | ||
140 | $rule = str_ireplace( Path::get_root(), '', untrailingslashit( wp_normalize_path( $rule ) ) ); |
|
141 | ||
142 | // Strip the preceeding slash |
|
143 | if ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) { |
|
144 | $rule = substr( $rule, 1 ); |
|
145 | } |
|
146 | ||
147 | // Wrap directory fragments and files in wildcards for zip |
|
148 | if ( $fragment || $file ) { |