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