mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Add constants for ftp connections timeouts, props dd32, see #10522
git-svn-id: https://develop.svn.wordpress.org/trunk@11823 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -605,6 +605,12 @@ function WP_Filesystem( $args = false, $context = false ) {
|
||||
|
||||
$wp_filesystem = new $method($args);
|
||||
|
||||
//Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default.
|
||||
if ( ! defined('FS_CONNECT_TIMEOUT') )
|
||||
define('FS_CONNECT_TIMEOUT', 30);
|
||||
if ( ! defined('FS_TIMEOUT') )
|
||||
define('FS_TIMEOUT', 30);
|
||||
|
||||
if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user