Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_delete_file

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
758           // Update the attachment
759           wp_insert_attachment($object, $cropped);
760           wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $cropped ) );
761           update_post_meta( $attachment_id, '_wp_attachment_is_custom_header', get_option('stylesheet' ) );
762
763           set_theme_mod('header_image', $url);
764
765           // cleanup
766           $medium = str_replace(basename($original), 'midsize-'.basename($original), $original);
767           @unlink( apply_filters( 'wp_delete_file', $medium ) );
768           @unlink( apply_filters( 'wp_delete_file', $original ) );
769
770           return $this->finished();
771      }
772
773      /**
774       * Display last step of custom header image page.
775       *
776       * @since 2.1.0
777       */