request_filesystem_credentials
request_filesystem_credentials ( $form_post, $type = '', $error = false, $context = '', $extra_fields = null, $allow_relaxed_file_ownership = false )
Parameters:- (string) form_post The URL to post the form to.
- (string) type Optional. Chosen type of filesystem. Default empty.
- (bool|WP_Error) error Optional. Whether the current request has failed to connect, or an error object. Default false.
- (string) context Optional. Full path to the directory that is tested for being writable. Default empty.
- (array) extra_fields Optional. Extra `POST` fields to be checked for inclusion in the post. Default null.
- (bool) allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
Returns:- (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.
Defined at:Change Log: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Displays a form to the user to request for their FTP/SSH details in order
to connect to the filesystem.All chosen/entered details are saved, excluding the password.
Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467)
to specify an alternate FTP/SSH port.
Plugins may override this form by returning true|false via the {@see 'request_filesystem_credentials'} filter.