From b8799eb4701a3f101f00e335edaafd163be4f774 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 5 May 2008 17:06:29 +0000 Subject: [PATCH] Use full path to fs abstraction class. Props DD32. fixes #6912 git-svn-id: https://develop.svn.wordpress.org/trunk@7895 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/file.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index a7c8228a03..a222b40bda 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -313,10 +313,15 @@ function WP_Filesystem( $args = false ) { global $wp_filesystem; $method = get_filesystem_method(); + if ( ! $method ) return false; - require_once('class-wp-filesystem-'.$method.'.php'); + $abstraction_file = apply_filters('filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-'.$method.'.php', $method); + if( ! file_exists($abstraction_file) ) + return; + + require_once($abstraction_file); $method = "WP_Filesystem_$method"; $wp_filesystem = new $method($args);