request_filesystem_credentials
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 )
过滤器::过滤文件系统凭据。
Filter Hook: Filters the filesystem credentials.
说明(Description)
返回除空字符串以外的任何内容都将有效地使文件系统凭据窗体的输出短路,而是返回该值。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$credentials | (mixed) | 而是返回凭据。默认空字符串。 |
$form_post | (string) | 将表单投递到的URL。 |
$type | (string) | 选择的文件系统类型。 |
$error | (bool | WP_Error) | 当前请求是连接失败,还是错误对象。 |
$context | (string) | 测试为可写的目录的完整路径。 |
$extra_fields | (array) | 额外的POST字段。 |
$allow_relaxed_file_ownership | (bool) | 是否允许组/世界可写。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.6.0 | wp-admin/includes/file.php:1997 | 1 | 0 |
request_filesystem_credentials 为WP2原创文章,链接:https://www.wp2.cn/hook/request_filesystem_credentials-2/