Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_handle_upload

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
389       * @param array  $upload {
390       *     Array of upload data.
391       *
392       *     @type string $file Filename of the newly-uploaded file.
393       *     @type string $url  URL of the uploaded file.
394       *     @type string $type File type.
395       * }
396       * @param string $context The type of upload action. Values include 'upload' or 'sideload'.
397       */
398      return apply_filters( 'wp_handle_upload', array(
399           'file' => $new_file,
400           'url'  => $url,
401           'type' => $type
402      ), 'wp_handle_sideload' === $action ? 'sideload' : 'upload' ); }
403
404 /**
405  * Wrapper for _wp_handle_upload(), passes 'wp_handle_upload' action.
406  *
407  * @since 2.0.0