_override_custom_logo_theme_mod

The timeline below displays how wordpress function _override_custom_logo_theme_mod has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

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;
}