_delete_site_logo_on_remove_custom_logo()
Deletes the site_logo when the custom_logo theme mod is removed.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Return
null
. Nothing (null).
Usage
_delete_site_logo_on_remove_custom_logo( $old_value, $value );
- $old_value(array) (required)
- Previous theme mod settings.
- $value(array) (required)
- Updated theme mod settings.
_delete_site_logo_on_remove_custom_logo() delete site logo on remove custom logo code WP 6.5.2
function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) { global $_ignore_site_logo_changes; if ( $_ignore_site_logo_changes ) { return; } // If the custom_logo is being unset, it's being removed from theme mods. if ( isset( $old_value['custom_logo'] ) && ! isset( $value['custom_logo'] ) ) { delete_option( 'site_logo' ); } }