You are here

oembed_providers_test.module in oEmbed Providers 1.1.x

Same filename and directory in other branches
  1. 2.x tests/modules/oembed_providers_test/oembed_providers_test.module

File

tests/modules/oembed_providers_test/oembed_providers_test.module
View source
<?php

/**
 * Implements hook_oembed_providers_alter().
 */
function oembed_providers_test_oembed_providers_alter(array &$providers) {

  // Add a custom provider.
  $providers[] = [
    'provider_name' => 'My Custom Provider',
    'provider_url' => 'http://my-custom-provider.example.com',
    'endpoints' => [
      [
        'schemes' => [
          'http://my-custom-provider.example.com/id/*',
          'https://my-custom-provider.example.com/id/*',
        ],
        'url' => 'https://my-custom-provider.example.com/api/v2/oembed/',
        'discovery' => 'true',
      ],
    ],
  ];
}