wppaste
WordPress

apply_filters( 'fs_ftp_connection_types', string[] $types, array $credentials, string $type, bool|WP_Error $error, string $context )

Since
2.9.0, 4.6.0
Filters the connection types to output to the filesystem credentials form.

Compatibility

WordPress
since 4.6.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$typesstring[]
Types of connections.
$credentialsarray
Credentials to connect with.
$typestring
Chosen filesystem method.
$errorbool|WP_Error
Whether the current request has failed to connect, or an error object.
$contextstring
Full path to the directory that is tested for being writable.

Where this hook fires · 1

  • wp-admin/includes/file.php:2549request_filesystem_credentials()

Source code

	 * @param array         $credentials Credentials to connect with.	 * @param string        $type        Chosen filesystem method.	 * @param bool|WP_Error $error       Whether the current request has failed to connect,	 *                                   or an error object.	 * @param string        $context     Full path to the directory that is tested for being writable.	 */	$types = apply_filters( 'fs_ftp_connection_types', $types, $credentials, $type, $error, $context );	?><form action="<?php echo esc_url( $form_post ); ?>" method="post"><div id="request-filesystem-credentials-form" class="request-filesystem-credentials-form">	<?php	// Print a H1 heading in the FTP credentials modal dialog, default is a H2.	$heading_tag = 'h2';

Changelog

Introduced in 2.9.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

4.6.0
The $context parameter default changed from false to an empty string.from the docblock
2.9.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.