filtrod 6.0.0
pre_wp_filesize
Opis — z kodu źródłowego
Filters the result of wp_filesize before the PHP function is run.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$size | null | int | The unfiltered value. Returning an int from the callback bypasses the filesize call. |
$path | string | Path to the file. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_wp_filesize', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_wp_filesize', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii