Hello @eurotunes,
As far as I understand you want to know if the feature “Lock and Protect System Folders” can allow a specific file to be accessed even if it’s located under the wp-content folder. At the moment there is no special filter to allow a PHP script to be accessible directly from one of the plugin’s folders. Consider moving the script directly to the wp-content folder and then set a custom exclude rule for the file in question:
add_filter( 'sgs_whitelist_wp_content' , 'whitelist_file_in_wp_content' );
function whitelist_file_in_wp_content( $whitelist ) {
$whitelist[] = 'file_name.php';
$whitelist[] = 'another_file_name.php';
return $whitelist;
}
Best Regards,
Simeon Boev
Hello @eurotunes,
There is no need to move the file into the wp-content directory.
The rules excluding it are placed in .htaccess file, so the exclude will be applied for the whole wp-content directory recursively.
There is no need to provide full path to the file as well. Simply the file name will be enough.
You need to simply add the filter to your theme functions.php file and the rules will do the rest.
Best Regards,
Elena
Hi Elena,
Thank you very much. Will do as suggested 🙂
Cheers, JJ
You are most welcome, @eurotunes!
You can drop a quick review for the plugin if you have the time, that would be highly appreciated 🙂
Best Regards,
Elena