Make WordPress Core


Ignore:
Timestamp:
12/20/2020 04:13:23 PM (3 years ago)
Author:
johnbillion
Message:

Upload: Introduce the {$action}_overrides filter that allows the overrides parameter for file uploads and file sideloads to be filtered.

The dynamic portion of the hook name, $action, refers to the post action.

Props iandunn, jakub.tyrcha, nacin, wonderboymusic, Mte90, johnbillion

Fixes #16849

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r49790 r49845  
    27922792 *
    27932793 * @param string   $filename File name or path.
    2794  * @param string[] $mimes    Optional. Array of mime types keyed by their file extension regex.
     2794 * @param string[] $mimes    Optional. Array of allowed mime types keyed by their file extension regex.
    27952795 * @return array {
    27962796 *     Values for the extension and mime type.
     
    28342834 * @param string   $filename The name of the file (may differ from $file due to $file being
    28352835 *                           in a tmp directory).
    2836  * @param string[] $mimes    Optional. Array of mime types keyed by their file extension regex.
     2836 * @param string[] $mimes    Optional. Array of allowed mime types keyed by their file extension regex.
    28372837 * @return array {
    28382838 *     Values for the extension, mime type, and corrected filename.
Note: See TracChangeset for help on using the changeset viewer.