WP HOOKS
filtrod 3.0.0

wp_check_filetype_and_ext

Args 5Plik wp-includes/functions.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the "real" file type of the given file.

Parametry

ParametrTypOpis
$wp_check_filetype_and_extarray{ Values for the extension, mime type, and corrected filename. @type string|false $ext File extension, or false if the file doesn't match a mime type. @type string|false $type File mime type, or false if the file doesn't match a mime type. @type string|false $proper_filename File name with its correct extension, or false if it cannot be determined. }
$filestringFull path to the file.
$filenamestringThe name of the file (may differ from $file due to $file being in a tmp directory).
$mimesstring[] | nullArray of mime types keyed by their file extension regex, or null if none were provided.
$real_mimestring | falseThe actual mime type or false if the type cannot be determined.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_check_filetype_and_ext', 'twoja_funkcja', 10, 5 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
	// Twój kod
}

Popularne w tej kategorii