Provides oEmbed support for URLs in text

Fund package maintenance!

Installs: 1 862

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 4

Forks: 2

Open Issues: 0


v4.0 2022-08-24 11:22 UTC

This package is auto-updated.

Last update: 2023-01-24 12:07:52 UTC


Elgg 4.3 Build Status Scrutinizer Code Quality Latest Stable Version License

Provides oEmbed support for URLs in text


  • This plugin tries to replace URLs in output/longtext with embed code. For example if you paste a YouTube URL it will be replaced by the embed code for that URL.
  • Nothing is done to the original text, so if the plugin is disabled all original links are still present.
  • In order to control which URLs should be replace there is a plugin setting for a whitelist and a blacklist. If the whitelist is set only those URLs will be replace and the blacklist is ignored. If only the blacklist is set, every URL except those on the blacklist will be replaced.


The results of the oEmbed requests is cached in system cache. This is to increase performance and reusability. If the cache is flushed requests will be made again.


Prevent oEmbed

In order to prevent the use of oEmbed on your use of output/longtext set a var 'oembed' => false.

Modifying valid URL

Before an oEmbed adapter is created based on a valid URL a hook is triggered. This allows last minute changes to the URL (eg. adding vaidation tokens). The hook is replace_url, oembed. The return value should be an URL. in the $params you get the original url under url.

Output views

To change the output of the oEmbed code the different types have their own view oembed/type/{$oembed_type}.