ABSPATH for Pressable Sites
-
Hi there,
I am with Pressable Customer Support. I wanted to propose a change in the way the plugin defines paths for the WAF.
On line 7376 of wordfenceClass.php there is this function:
public static function getWAFBootstrapPath() {
return ABSPATH . ‘wordfence-waf.php’;
}On Pressable,
ABSPATHis the location of the core WordPress files. However, those core files are not the same location of the site root.I’d like to suggest a possible workaround, which will at least work on Pressable sites:
public static function getWAFBootstrapPath() {
if (is_writeable(ABSPATH)) {
return ABSPATH . ‘wordfence-waf.php’;
} else {
return str_replace(‘/wp-content’,”,WP_CONTENT_DIR);
}
}With a function like this, the Wordfence WAF would enable without issue.
Also, our Director of Support had previously requested a similar change a year ago: https://wordpress.org/support/topic/use-wp_content_dir-instead-of-abspath-for-wordfence-waf-php-creation/
Thanks in advance for your consideration!
Best,
Bradly M. Hale
Pressable Customer Support
The topic ‘ABSPATH for Pressable Sites’ is closed to new replies.