This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
This code handles loading a file from one or more protected directories. | |
This is a variation of the code presented here: | |
https://www.paidmembershipspro.com/locking-non-wordpress-files-folders-paid-memberships-pro/ | |
(!) Be sure to change the $protected_directories arary below. | |
(!) Add this code to a code snippet or custom plugin. | |
(!) You should have a corresponding bit of code in your Apache .htaccess file | |
to redirect files to this script. You need one line per protected dir. | |
### |