首页 WordPress函数大全 request_filesystem_credentials()

request_filesystem_credentials()

2020-05-02 / 6721阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

request_filesystem_credentials( string $form_post, string $type = '', bool|WP_Error $error = false, string $context = '', array $extra_fields = null, bool $allow_relaxed_file_ownership = false )

向用户显示一个表单,以请求其FTP / SSH详细信息以连接到文件系统。

描述

保存所有选择/输入的详细信息,密码除外。

主机名可以采用主机名:端口号的形式(例如:wordpress.org:2467)来指定备用FTP / SSH端口。

插件可以通过'request_filesystem_credentials'过滤器返回true | false来覆盖此格式。

参数

$form_post

(string)
(Required)
The URL to post the form to.

$type

(string)
(Optional)
Chosen type of filesystem.

Default value: ''

$error

(bool|WP_Error)
(Optional)
Whether the current request has failed to connect, or an error object.

Default value: false

$context

(string)
(Optional)
Full path to the directory that is tested for being writable.

Default value: ''

$extra_fields

(array)
(Optional)
Extra POST fields to be checked for inclusion in the post.

Default value: null

$allow_relaxed_file_ownership

(bool)
(Optional)
Whether to allow Group/World writable.

Default value: false

返回

(bool|array) True if no filesystem credentials are required, false if they are required but have not been provided, array of credentials if they are required and have been provided.

大家谈论
    我的见解