pre_wp_unique_filename_file_list

FILTER wp-includes\functions.php (ligne 2676) github
Filters the file list used for calculating a unique filename for a newly added file. Returning an array from the filter will effectively short-circuit retrieval from the filesystem and return the passed value instead.

Paramètres

Entrée :
null, $dir, $filename
Sortie :
@param array|null $files    The list of files to use for filename comparisons.
@param string     $dir      The directory for the new file.
@param string     $filename The proposed filename for the new file.

Utilisation

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

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

Actualités

Chargement des actualités...