apply_filters( ‘request_filesystem_credentials’, mixed $credentials, string $form_post, string $type, bool|WP_Error $error, string $context, array $extra_fields, bool $allow_relaxed_file_ownership )

In this article

Filters the filesystem credentials.


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

A filter should return true if no filesystem credentials are required, false if they are required but have not been provided, or an array of credentials if they are required and have been provided.


Credentials to return instead. Default empty string.
The URL to post the form to.
Chosen type of filesystem.
Whether the current request has failed to connect, or an error object.
Full path to the directory that is tested for being writable.
Extra POST fields.
Whether to allow Group/World writable.


$req_cred = apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields, $allow_relaxed_file_ownership );


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

User Contributed Notes

You must log in before being able to contribute a note or feedback.