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,如果需要並提供了憑證,則返回一個陣列。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$req_cred = apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields, $allow_relaxed_file_ownership );
$req_cred = apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields, $allow_relaxed_file_ownership );
$req_cred = apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields, $allow_relaxed_file_ownership );

常見問題

FAQs
檢視更多 >