WordPress Version: 5.8
/**
* Updates the site_logo option when the custom_logo theme-mod gets updated.
*
* @param mixed $value Attachment ID of the custom logo or an empty value.
* @return mixed
*/
function _sync_custom_logo_to_site_logo($value)
{
if (empty($value)) {
delete_option('site_logo');
} else {
update_option('site_logo', $value);
}
return $value;
}