request_filesystem_credentials

过滤钩子
apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields, $allow_relaxed_file_ownership )
参数
  • (mixed) $credentials Credentials to return instead. Default empty string.
    Required:
  • (string) $form_post The URL to post the form to.
    Required:
  • (string) $type Chosen type of filesystem.
    Required:
  • (bool|WP_Error) $error Whether the current request has failed to connect, or an error object.
    Required:
  • (string) $context Full path to the directory that is tested for being writable.
    Required:
  • (array) $extra_fields Extra POST fields.
    Required:
  • (bool) $allow_relaxed_file_ownership Whether to allow Group/World writable.
    Required:
定义位置
相关勾子
filesystem_method_filerest_delete_commentfilesystem_methodrest_insert_commentsite_details
相关方法
request_filesystem_credentialswp_print_request_filesystem_credentials_modalget_filesystem_methodrest_api_register_rewritesget_registered_settings_wp_privacy_requests_screen_options
引入
4.6.0
弃用
-

request_filesystem_credentials: 这是一个WordPress的函数,用于检索访问文件系统所需的凭证。它用于执行需要访问文件系统的操作,如安装插件或主题。

过滤文件系统的凭证。

返回除空字符串以外的任何东西都将有效地阻断文件系统凭证表格的输出,而返回该值。

如果不需要文件系统凭证,过滤器应该返回 true,如果需要但没有提供,则返回 false,如果需要并提供了凭证,则返回一个数组。

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

常见问题

FAQs
查看更多 >