WP HOOKS
filtrod 2.5.0

request_filesystem_credentials

Args 7Plik wp-admin/includes/file.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the filesystem credentials.

Returning anything other than an empty string will effectively short-circuit output of the filesystem credentials form, returning that value instead. A filter should return true if no filesystem credentials are required, false if they are required but have not been provided, or an array of credentials if they are required and have been provided.

Parametry

ParametrTypOpis
$credentialsmixedCredentials to return instead. Default empty string.
$form_poststringThe URL to post the form to.
$typestringChosen type of filesystem.
$errorbool | \WP_ErrorWhether the current request has failed to connect, or an error object.
$contextstringFull path to the directory that is tested for being writable.
$extra_fieldsarrayExtra POST fields.
$allow_relaxed_file_ownershipboolWhether to allow Group/World writable.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'request_filesystem_credentials', 'twoja_funkcja', 10, 7 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5, $param_6, $param_7) {
	// Twój kod
}

Popularne w tej kategorii