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 |
---|---|
289 | $parent_url = $parent->guid; |
290 |
|
291 | $url = str_replace(basename($parent_url), basename($header), $parent_url); |
292 |
|
293 | set_theme_mod('header_image', $url); |
294 |
|
295 | // cleanup |
296 | $file = get_attached_file( $_POST['attachment_id'] ); |
297 | $medium = str_replace(basename($file), 'midsize-'.basename($file), $file); |
298 | @unlink( apply_filters( 'wp_delete_file', $medium ) ); |
299 | wp_delete_attachment( $_POST['attachment_id'] ); |
300 |
|
301 | return $this->finished(); |
302 | } |
303 |
|
304 | function finished() { |
305 | ?> |
306 | <div class="wrap"> |
307 | <h2><?php _e('Header complete!'); ?></h2> |