WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
315 |
|
316 | // Set correct file permissions |
317 | $stat = stat( dirname( $new_file )); |
318 | $perms = $stat['mode'] & 0000666; |
319 | @ chmod( $new_file, $perms ); |
320 |
|
321 | // Compute the URL |
322 | $url = $uploads['url'] . "/$filename"; |
323 |
|
324 | return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) ); |
325 | } |
326 |
|
327 | /** |
328 | * {@internal Missing Short Description}} |
329 | * |
330 | * Pass this function an array similar to that of a $_FILES POST array. |
331 | * |
332 | * @since unknown |
333 | * |
Line | Code |
425 |
|
426 | // Set correct file permissions |
427 | $stat = stat( dirname( $new_file )); |
428 | $perms = $stat['mode'] & 0000666; |
429 | @ chmod( $new_file, $perms ); |
430 |
|
431 | // Compute the URL |
432 | $url = $uploads['url'] . "/$filename"; |
433 |
|
434 | $return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) ); |
435 |
|
436 | return $return; |
437 | } |
438 |
|
439 | /** |
440 | * Downloads a url to a local temporary file using the WordPress HTTP Class. |
441 | * Please note, That the calling function must unlink() the file. |
442 | * |
443 | * @since 2.5.0 |