wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_check_filetype_and_ext › Les Filtres WordPress

Depuis5.1.0
Dépréciéen/a
› apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' )
Paramètres: (5)
  • () wp_check_filetype_and_ext { 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. }
    Requis: Oui
  • () file Full path to the file.
    Requis: Oui
  • () filename The name of the file (may differ from $file due to $file being in a tmp directory).
    Requis: Oui
  • () mimes Array of mime types keyed by their file extension regex, or null if none were provided.
    Requis: Oui
  • () real_mime The actual mime type or false if the type cannot be determined.
    Requis: Oui
Défini(e) dans:
Codex:

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





Source

return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes, $real_mime );