class Oembed (View source)

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).


name: Oembed
---
Oembed:
  providers:
    'http://*.youtube.com/watch*':
    'http://www.youtube.com/oembed/'
  autodiscover:
    true

Methods

public static 
is_enabled()

No description

public static 
get_autodiscover()

Gets the autodiscover setting from the config.

public static 
get_providers()

Gets providers from config.

protected static 
find_endpoint($url)

Returns an endpoint (a base Oembed URL) from first matching provider.

protected static 
matches_scheme($url, $scheme)

Checks the URL if it matches against the scheme (pattern).

protected static 
autodiscover_from_url($url)

Performs a HTTP request to the URL and scans the response for resource links that mention oembed in their type.

public static 
bool|string
autodiscover_from_body(string $body)

Given a response body, determine if there is an autodiscover url

public static 
get_oembed_from_url($url, $type = false, array $options = array())

Takes the human-readable URL of an embeddable resource and converts it into an Oembed_Result descriptor (which contains a full Oembed resource URL).

public static 
handle_shortcode($arguments, $url, $parser, $shortcode)

No description

Details

static is_enabled()

No description

static get_autodiscover()

Gets the autodiscover setting from the config.

static get_providers()

Gets providers from config.

static protected find_endpoint($url)

Returns an endpoint (a base Oembed URL) from first matching provider.

Parameters

$url

Human-readable URL.

static protected matches_scheme($url, $scheme)

Checks the URL if it matches against the scheme (pattern).

Parameters

$url

Human-readable URL to be checked.

$scheme

Pattern to be matched against.

static protected autodiscover_from_url($url)

Performs a HTTP request to the URL and scans the response for resource links that mention oembed in their type.

Parameters

$url

Human readable URL.

static bool|string autodiscover_from_body(string $body)

Given a response body, determine if there is an autodiscover url

Parameters

string $body

Return Value

bool|string

static get_oembed_from_url($url, $type = false, array $options = array())

Takes the human-readable URL of an embeddable resource and converts it into an Oembed_Result descriptor (which contains a full Oembed resource URL).

Parameters

$url

Human-readable URL

$type ?
array $options

array Options to be used for constructing the resulting descriptor.

static handle_shortcode($arguments, $url, $parser, $shortcode)

No description

Parameters

$arguments
$url
$parser
$shortcode