WordPress Version: 5.8
/**
* Overrides the custom logo with a site logo, if the option is set.
*
* @param string $custom_logo The custom logo set by a theme.
*
* @return string The site logo if set.
*/
function _override_custom_logo_theme_mod($custom_logo)
{
$site_logo = get_option('site_logo');
return (false === $site_logo) ? $custom_logo : $site_logo;
}