You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had a request from a user and I'm not positive I understand how difficult this would be or whether it's already possible and the customer might be trying to go about it in the wrong way? Could I get feedback from another dev when able?
... I am trying to extend your BackUpWordPress plugin by excluding files.
I'd like to use REGEX, and I found the "hmbkp_default_excludes" hook in your code. However, I'm having an issue.
In classes/class-excludes.php, the filter appears on line 148(in version 3.6.4). However, that output is passed to the "normalize" method on line 150 during the return.
Further, on line 166 in the "normalize" method, the code calls "wp_normalize_path" while mapping over each exclusion in the excludes array.
The issue I'm having is that the native "wp_normalize_path" function replaces backslashes() with forward slashes(/). This causes a problem with some PCRE tokens that use backslashes.
I understand the need to "normalize" the exclude paths for Windows systems before passing to preg_*. However, I'm wondering if there's a better way to allow for filtering by third-party plugins.
Could you perhaps throw an "apply_filters" down in the "is_file_excluded" method in the same file? Or perhaps you all have a better solution to allow third-parties to filter the excluded files...
The text was updated successfully, but these errors were encountered:
Wondering if double-escaping the backslashes would work for him eg. `\d` to
match a digit would become '\\d'.
Will have to do some experimenting but not sure when I can right now.
Had a request from a user and I'm not positive I understand how difficult this would be or whether it's already possible and the customer might be trying to go about it in the wrong way? Could I get feedback from another dev when able?
The text was updated successfully, but these errors were encountered: