WordPress at a glance
filter is not described

request_filesystem_credentials filter-hook . WP 2.5.0

Filters the filesystem credentials form output.

Returning anything other than an empty string will effectively short-circuit output of the filesystem credentials form, returning that value instead.

Usage

add_filter( 'request_filesystem_credentials', 'filter_function_name_2002', 10, 7 );
function filter_function_name_2002( $output, $form_post, $type, $error, $context, $allow_relaxed_file_ownership, $extra_fields ){
	// filter...

	return $output;
}
$output(mixed)
Form output to return instead.
Default: ''
$form_post(string)
The URL to post the form to.
$type(string)
Chosen type of filesystem.
$error(true/false)
Whether the current request has failed to connect.
Default: false
$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.
Default: false
$extra_fields(array)
Extra POST fields.

Notes

  • Since 4.6.0 The $context parameter default changed from false to an empty string.

Where the hook is called

request_filesystem_credentials()
request_filesystem_credentials
wp-admin/includes/file.php 1566
$req_cred = apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields, $allow_relaxed_file_ownership );

Where the hook is used (in WP core)

Does not used.