Closed MeMattStone closed 2 years ago
Having this exact issue + can confirm this PR fixes it, nice one @MeMattStone 👍🏻
Hello, I hate to be annoying, but is there any reason not to merge this PR ? It fixes a bug that many people (including myself) encountered and the code changes are really small.
yes, this should be approved. Premium hosting services like Pantheon that have separate environments for dev-test-production will run into this during the lifecycle of development. I don't understand why this isn't merged.
In addition, the pro version requires the change in one additional function, as a heads up to the development team on that.
I just ran into this issue using Bedrock, which uses composer to manage plugins/dependencies. Bedrock isn't at fault though, it makes sense to disable plugin installation on production sites, since most end users have no idea what they're doing.
I approve of this PR, please merge it !
@MeMattStone thanks for the PR and sorry for the long delay on this one.
This change seems pretty sensible and could save a bunch of headaches, so I've raised an issue on our internal repo to look into getting something like this merged in an upcoming release.
In the meantime, if anyone else runs into a similar issue, you could use the bsr_capability
filter to change the filter required to run BSR like so:
https://gist.github.com/mattgrshaw/90766cce44badadaae34
Worked out great for me, thank you.
As KeyvanE i am using an Bedrock application and couldn't at first see the search and replace in the toolbar.
Modified the plugin code according to the merge request and now its smooth sailing again.
Closing this pull request as some of the changes have been incorporated into v1.4
… to still allow admins to use Better Search Replace from the tools menu.
Created function within BSR_Admin to allow for getting an appropriate capability to work in different types of environments, and also used same code in function that initially runs the plugin.
Fixes #74