request_filesystem_credentials

FUNCTION wp-admin\includes\file.php (ligne 2322) github
Filters the filesystem method to use.

Paramètres

Entrée :
$form_post, $type = '', $error = false, $context = '', $extra_fields = null, $allow_relaxed_file_ownership = false
Sortie :
@param string $method                       Filesystem method to return.
@param array  $args                         An array of connection details for the method.
@param string $context                      Full path to the directory that is tested for being writable.
@param bool   $allow_relaxed_file_ownership Whether to allow Group/World writable.
@param string        $form_post                    The URL to post the form to.
@param string        $type                         Optional. Chosen type of filesystem. Default empty.
@param bool|WP_Error $error                        Optional. Whether the current request has failed
@param string        $context                      Optional. Full path to the directory that is tested
@param array         $extra_fields                 Optional. Extra `POST` fields to be checked
@param bool          $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable.
@return bool|array True if no filesystem credentials are required,

Utilisation

// Utilisation de la fonction request_filesystem_credentials
$result = request_filesystem_credentials($form_post, $type = '', $error = false, $context = '', $extra_fields = null, $allow_relaxed_file_ownership = false);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...