WP_Site_Icon::delete_attachment_data( int $post_id )

In this article

Deletes the Site Icon when the image file is deleted.

Parameters

$post_idintrequired
Attachment ID.

Source

public function delete_attachment_data( $post_id ) {
	$site_icon_id = (int) get_option( 'site_icon' );

	if ( $site_icon_id && $post_id === $site_icon_id ) {
		delete_option( 'site_icon' );
	}
}

Changelog

VersionDescription
4.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.