filesystem_method filter-hookWP 2.6.0

Filters the filesystem method to use.

Usage

add_filter( 'filesystem_method', 'wp_kama_filesystem_method_filter', 10, 4 );

/**
 * Function for `filesystem_method` filter-hook.
 * 
 * @param string $method                       Filesystem method to return.
 * @param array  $args                         An array of connection details for the method.
 * @param string $context                      Full path to the directory that is tested for being writable.
 * @param bool   $allow_relaxed_file_ownership Whether to allow Group/World writable.
 *
 * @return string
 */
function wp_kama_filesystem_method_filter( $method, $args, $context, $allow_relaxed_file_ownership ){

	// filter...
	return $method;
}
$method(string)
Filesystem method to return.
$args(array)
An array of connection details for the method.
$context(string)
Full path to the directory that is tested for being writable.
$allow_relaxed_file_ownership(true|false)
Whether to allow Group/World writable.

Changelog

Since 2.6.0 Introduced.

Where the hook is called

get_filesystem_method()
filesystem_method
wp-admin/includes/file.php 2338
return apply_filters( 'filesystem_method', $method, $args, $context, $allow_relaxed_file_ownership );

Where the hook is used in WordPress

Usage not found.