pre_move_uploaded_file

FILTER wp-admin\includes\file.php (ligne 1010) github
Filters whether to short-circuit moving the uploaded file after passing all checks. If a non-null value is returned from the filter, moving the file and any related error reporting will be completely skipped.

Paramètres

Entrée :
null, $file, $new_file, $type
Sortie :
@param mixed    $move_new_file If null (default) move the file after the upload.
@param array    $file          {
@param string   $new_file      Filename of the newly-uploaded file.
@param string   $type          Mime type of the newly-uploaded file.

Utilisation

// Modifier la valeur avec le filtre 'pre_move_uploaded_file'
add_filter('pre_move_uploaded_file', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...