@@ 144-146 (lines=3) @@ | ||
141 | if ( ! in_array( substr( $rule, - 1 ), array( '\\', '/' ) ) ) { |
|
142 | $file = true; |
|
143 | } // If rule starts with a / then treat as absolute path |
|
144 | elseif ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) { |
|
145 | $absolute = true; |
|
146 | } // Otherwise treat as dir fragment |
|
147 | else { |
|
148 | $fragment = true; |
|
149 | } |
|
@@ 154-156 (lines=3) @@ | ||
151 | $rule = str_ireplace( Path::get_root(), '', untrailingslashit( wp_normalize_path( $rule ) ) ); |
|
152 | ||
153 | // Strip the preceeding slash |
|
154 | if ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) { |
|
155 | $rule = substr( $rule, 1 ); |
|
156 | } |
|
157 | ||
158 | // Wrap directory fragments and files in wildcards for zip |
|
159 | if ( $fragment || $file ) { |