wp_handle_upload
wp_handle_upload
Appears in: wordpress-4.0, wordpress-4.4, wordpress-4.8, wordpress-4.9, wordpress-4.9.4, wordpress-4.9.5, wordpress-4.9.6, wordpress-4.9.7, wordpress-4.9.8, wordpress-5.0, wordpress-5.0.1, wordpress-5.0.2, wordpress-5.0.3
Hook Type: action
See hook in action
Displaying hooks found in version: wordpress-5.0.3do_action('wp_handle_upload') is found 2 times:
- /wp-admin/includes/file.php line 889
* @type string $type File type. * } * @param string $context The type of upload action. Values include 'upload' or 'sideload'. */ return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'wp_handle_sideload' === $action ? 'sideload' : 'upload' ); }
- /wp-includes/functions.php line 2220
// Compute the URL $url = $upload['url'] . "/$filename"; /** This filter is documented in wp-admin/includes/file.php */ return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $wp_filetype['type'], 'error' => false ), 'sideload' ); } /** * Retrieve the file type based on the extension name. * * @since 2.5.0