function media_test_oembed_preprocess_media_oembed_iframe in Drupal 9
Implements hook_preprocess_media_oembed_iframe().
File
- core/
modules/ media/ tests/ modules/ media_test_oembed/ media_test_oembed.module, line 13 - Helper module for the Media oEmbed tests.
Code
function media_test_oembed_preprocess_media_oembed_iframe(array &$variables) {
if ($variables['resource']
->getProvider()
->getName() === 'YouTube') {
$variables['media'] = str_replace('?feature=oembed', '?feature=oembed&pasta=rigatoni', (string) $variables['media']);
}
}