Automatic_Upgrader_Skin::request_filesystem_credentials( bool $error = false, string $context = '', bool $allow_relaxed_file_ownership = false )

Determines whether the upgrader needs FTP/SSH details in order to connect to the filesystem.

Description Description

See also See also

Top ↑

Parameters Parameters


(bool) (Optional) Whether the current request has failed to connect.

Default value: false


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

Default value: ''


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

Default value: false

Top ↑

Return Return

(bool) True on success, false on failure.

Top ↑

Source Source

File: wp-admin/includes/class-automatic-upgrader-skin.php

	public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
		if ( $context ) {
			$this->options['context'] = $context;
		// TODO: fix up request_filesystem_credentials(), or split it, to allow us to request a no-output version
		// This will output a credentials form in event of failure, We don't want that, so just hide with a buffer
		$result = parent::request_filesystem_credentials( $error, $context, $allow_relaxed_file_ownership );
		return $result;

Top ↑

Changelog Changelog

Version Description
4.6.0 The $context parameter default changed from false to an empty string.
3.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.