You are here

private function SocialEmbedUrlFilter::getPatterns in Open Social 8.8

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  2. 8 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  3. 8.2 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  4. 8.3 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  5. 8.4 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  6. 8.5 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  7. 8.6 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  8. 8.7 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  9. 10.3.x modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  10. 10.0.x modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  11. 10.1.x modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()
  12. 10.2.x modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::getPatterns()

A list of whitelisted patterns.

Return value

array The list of patterns.

1 call to SocialEmbedUrlFilter::getPatterns()
SocialEmbedUrlFilter::whiteList in modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php
Checks if item is on the whitelist.

File

modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php, line 74

Class

SocialEmbedUrlFilter
Provides a filter to display embedded entities based on data attributes.

Namespace

Drupal\social_embed\Plugin\Filter

Code

private function getPatterns() {
  return [
    'facebook.com\\/(.*)\\/videos\\/(.*)',
    'facebook.com\\/(.*)\\/photos\\/(.*)',
    'facebook.com\\/(.*)\\/posts\\/(.*)',
    'flickr.com\\/photos\\/(.*)',
    'flic.kr\\/p\\/(.*)',
    'instagram.com\\/p\\/(.*)',
    'open.spotify.com\\/track\\/(.*)',
    'twitter.com\\/(.*)\\/status\\/(.*)',
    'vimeo.com\\/\\d{7,9}',
    'youtube.com\\/watch[?]v=(.*)',
    'youtu.be\\/(.*)',
    'ted.com\\/talks\\/(.*)',
  ];
}