\Oembed
Format of the Oembed config. Autodiscover allows discovery of all URLs.
Endpoint set to true means autodiscovery for this specific provider is
allowed (even if autodiscovery in general has been disabled).
<code>
name: Oembed
---
Oembed:
providers:
'http://*.youtube.com/watch*':
'http://www.youtube.com/oembed/'
autodiscover:
true
</code>
Synopsis
class Oembed
implements
ShortcodeHandler
{
- // methods
- public static void is_enabled()
- public static void get_autodiscover()
- public static void get_providers()
- protected static void find_endpoint()
- protected static void matches_scheme()
- protected static void autodiscover_from_url()
- public static bool|string autodiscover_from_body()
- public static void get_oembed_from_url()
- public static void get_shortcodes()
- public static void handle_shortcode()
Hierarchy
Implements
- ShortcodeHandler
Methods
protected
- autodiscover_from_url() — Performs a HTTP request to the URL and scans the response for resource links that mention oembed in their type.
- find_endpoint() — Returns an endpoint (a base Oembed URL) from first matching provider.
- matches_scheme() — Checks the URL if it matches against the scheme (pattern).
public
- autodiscover_from_body() — Given a response body, determine if there is an autodiscover url
- get_autodiscover() — Gets the autodiscover setting from the config.
- get_oembed_from_url() — Takes the human-readable URL of an embeddable resource and converts it into an Oembed_Result descriptor (which contains a full Oembed resource URL).
- get_providers() — Gets providers from config.
- get_shortcodes()
- handle_shortcode()
- is_enabled()