_delete_site_logo_on_remove_custom_logo

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

WordPress Version: 5.9

/**
 * Deletes the site_logo when the custom_logo theme mod is removed.
 *
 * @param array $old_value Previous theme mod settings.
 * @param array $value     Updated theme mod settings.
 */
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');
    }
}

WordPress Version: 5.8

/**
 * Deletes the site_logo when the custom_logo theme mod is removed.
 *
 * @param array $old_value Previous theme mod settings.
 * @param array $value     Updated theme mod settings.
 */
function _delete_site_logo_on_remove_custom_logo($old_value, $value)
{
    // 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');
    }
}