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 |
---|---|
281 |
|
282 | $url = str_replace(basename($parent_url), basename($header), $parent_url); |
283 |
|
284 | set_theme_mod('header_image', $url); |
285 |
|
286 | // cleanup |
287 | $file = get_attached_file( $_POST['attachment_id'] ); |
288 | $medium = str_replace(basename($file), 'midsize-'.basename($file), $file); |
289 | @unlink( $medium ); |
290 | apply_filters( 'wp_delete_file', $medium ); |
291 | wp_delete_attachment( $_POST['attachment_id'] ); |
292 |
|
293 | return $this->finished(); |
294 | } |
295 |
|
296 | function finished() { |
297 | ?> |
298 | <div class="wrap"> |
299 | <h2><?php _e('Header complete!'); ?></h2> |