Whitelisting a script | WordPress.org

[ad_1]

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

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer