Skip to content

Commit

Permalink
Merge pull request #9 from tvalimaa/vimeo_support
Browse files Browse the repository at this point in the history
field vimeo support preprocess_field
  • Loading branch information
tvalimaa authored Aug 26, 2024
2 parents bc79be0 + 2452b43 commit 621e3f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iframe_cookie_consent.module
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ function iframe_cookie_consent_preprocess_field(&$variables, $hook) {
$config = \Drupal::config('iframe_cookie_consent.settings');
// Get cookie consent category.
$consent_cat = $config->get('cookieconsent_category') ?? 'marketing';
// Youtube regex pattern.
$regex_pattern = "/(youtube.com|youtu.be)\/(embed)?(\?v=)?(\S+)?/";
// Youtube and Vimeo regex pattern.
$regex_pattern = "/(youtube.com|youtu.be|player.vimeo.com)\/(embed)?(video)?(\?v=)?(\S+)?/";

foreach ($variables['items'] as $key => $item) {
// Check that content type is html_tag.
Expand Down

0 comments on commit 621e3f5

Please sign in to comment.