function media_post_update_set_blank_iframe_domain_to_null

Updates media.settings:iframe_domain config if it's still at the default.

File

core/modules/media/media.post_update.php, line 41

Code

function media_post_update_set_blank_iframe_domain_to_null() {
    $media_settings = \Drupal::configFactory()->getEditable('media.settings');
    if ($media_settings->get('iframe_domain') === '') {
        $media_settings->set('iframe_domain', NULL)
            ->save(TRUE);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.