Closed dcavins closed 3 years ago
Note that this follows the previous pattern of using the cached value if it is not an empty string. Per out conversation, we talked about adding a "force re-check" link to the admin notice or similar so that the end user could skip the cached version. That still needs to be added.
What you've got here so far looks good.
I had to do some manual cherry-picking to merge this into the 2.2.x branch. Could you check that branch out and make sure that I didn't mess it up? :-D
Thanks, Boone! The commits in the 2.2.x branch look good to me and the code is working in my tests.
Thanks for the quick work!
Instead of running the attachments protection check every time a site admin visits the WP Admin area, run it no more often than once every 24 hours. If it hasn't been 24 hours, return the value saved in the
bp_docs_attachment_protection
option.