{$action}_overrides WordPress Filter Hook

The {$action}_overrides hook allows you to override any of the default actions that are defined in your theme. This can be useful if you want to change the way a certain element is displayed, or if you want to add a new action to an existing element.

apply_filters( "{$action}_overrides", array|false $overrides, array $file ) #

Filters the override parameters for a file before it is uploaded to WordPress.


Description

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

Possible hook names include:

  • wp_handle_sideload_overrides
  • wp_handle_upload_overrides

Top ↑

Parameters

$overrides

(array|false)An array of override parameters for this file. Boolean false if none are provided. @see _wp_handle_upload().

$file

(array)Reference to a single element from $_FILES.

  • 'name'
    (string) The original name of the file on the client machine.
  • 'type'
    (string) The mime type of the file, if the browser provided this information.
  • 'tmp_name'
    (string) The temporary filename of the file in which the uploaded file was stored on the server.
  • 'size'
    (int) The size, in bytes, of the uploaded file.
  • 'error'
    (int) The error code associated with this file upload.


Top ↑

Source

File: wp-admin/includes/file.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.