filtrod 5.5.0
pre_wp_unique_filename_file_list
Opis — z kodu źródłowego
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.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$files | array | null | The list of files to use for filename comparisons. Default null (to retrieve the list from the filesystem). |
$dir | string | The directory for the new file. |
$filename | string | The proposed filename for the new file. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_wp_unique_filename_file_list', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_wp_unique_filename_file_list', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii