Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Allow for filtering by third-party plugins #1190

Open
katmoody opened this issue Mar 19, 2018 · 1 comment
Open

Feature Request - Allow for filtering by third-party plugins #1190

katmoody opened this issue Mar 19, 2018 · 1 comment

Comments

@katmoody
Copy link
Contributor

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...

@roborourke
Copy link
Contributor

roborourke commented Mar 20, 2018 via email

@katmoody katmoody removed their assignment Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants