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.
| Line | Code |
|---|---|
| 1351 | |
| 1352 | if ( $file ) |
| 1353 | update_attached_file( $post_ID, $file ); |
| 1354 | |
| 1355 | clean_post_cache($post_ID); |
| 1356 | |
| 1357 | if ( $update) { |
| 1358 | do_action('edit_attachment', $post_ID); |
| 1359 | } else { |
| 1360 | do_action('add_attachment', $post_ID); |
| 1361 | } |
| 1362 | |
| 1363 | return $post_ID; |
| 1364 | } |
| 1365 | |
| 1366 | function wp_delete_attachment($postid) { |
| 1367 | global $wpdb; |
| 1368 | $postid = (int) $postid; |
| 1369 | |