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 |
|---|---|
| 302 | |
| 303 | // Set correct file permissions |
| 304 | $stat = stat( dirname( $new_file )); |
| 305 | $perms = $stat['mode'] & 0000666; |
| 306 | @ chmod( $new_file, $perms ); |
| 307 | |
| 308 | // Compute the URL |
| 309 | $url = $uploads['url'] . "/$filename"; |
| 310 | |
| 311 | return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) ); |
| 312 | } |
| 313 | |
| 314 | /** |
| 315 | * {@internal Missing Short Description}} |
| 316 | * |
| 317 | * Pass this function an array similar to that of a $_FILES POST array. |
| 318 | * |
| 319 | * @since unknown |
| 320 | * |
| Line | Code |
| 412 | |
| 413 | // Set correct file permissions |
| 414 | $stat = stat( dirname( $new_file )); |
| 415 | $perms = $stat['mode'] & 0000666; |
| 416 | @ chmod( $new_file, $perms ); |
| 417 | |
| 418 | // Compute the URL |
| 419 | $url = $uploads['url'] . "/$filename"; |
| 420 | |
| 421 | $return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) ); |
| 422 | |
| 423 | return $return; |
| 424 | } |
| 425 | |
| 426 | /** |
| 427 | * Downloads a url to a local file using the Snoopy HTTP Class. |
| 428 | * |
| 429 | * @since unknown |
| 430 | * @todo Transition over to using the new HTTP Request API (jacob). |