WP_Site_Icon::delete_attachment_data( int $post_id )

Deletes the Site Icon when the image file is deleted.


Parameters Parameters

$post_id

(int) (Required) Attachment ID.


Top ↑

Source Source

File: wp-admin/includes/class-wp-site-icon.php

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

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


Top ↑

Changelog Changelog

Changelog
Version Description
4.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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