Uses
Uses | Description |
---|---|
wp-includes/option.php: delete_option() | Removes option by name. Prevents removal of protected WordPress options. |
wp-includes/option.php: get_option() | Retrieves an option value based on an option name. |
Deletes the Site Icon when the image file is deleted.
(int) (Required) Attachment ID.
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' ); } }
Version | Description |
---|---|
4.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_site_icon/delete_attachment_data