Make WordPress Core

Ticket #16849: 16489.3.patch

File 16489.3.patch, 804 bytes (added by Mte90, 7 years ago)

refreshed patch

  • src/wp-admin/includes/file.php

     
    263263         */
    264264        $file = apply_filters( "{$action}_prefilter", $file );
    265265
     266        /**
     267         * Filters the ovverride action for a file before it is uploaded to WordPress.
     268         *
     269         * The dynamic portion of the hook name, `$action`, refers to the post action.
     270         *
     271         * @param array $file An array of overrides actions.
     272         */
     273        $overrides = apply_filters( "{$action}_overrides", $overrides );
     274
    266275        // You may define your own function and pass the name in $overrides['upload_error_handler']
    267276        $upload_error_handler = 'wp_handle_upload_error';
    268277        if ( isset( $overrides['upload_error_handler'] ) ) {