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.
Parameters
$credentialsmixed
Credentials to return instead. Default empty string.
$form_poststring
The URL to post the form to.
$typestring
Chosen type of filesystem.
$errorbool|WP_Error
Whether the current request has failed to connect, or an error object.
$contextstring
Full path to the directory that is tested for being writable.
2383*or an error object.2384* @param string$context Full path to the directory that is tested for2385* being writable.2386* @param array$extra_fields Extra POST fields.2387* @param bool$allow_relaxed_file_ownership Whether to allow Group/World writable.2388*/2389$req_cred=apply_filters('request_filesystem_credentials','',$form_post,$type,$error,$context,$extra_fields,$allow_relaxed_file_ownership);23902391if(''!==$req_cred){2392return$req_cred;2393}23942395if(empty($type)){
History
Introduced in 2.5.0. Unchanged from 6.7.7 through 7.1.0.