class EmbedShortcodeProvider implements ShortcodeHandler (View source)

Provider for the [embed] shortcode tag used by the embedding service in the HTML Editor field.

Provides the html needed for the frontend and the editor field itself.

Traits

Provides extensions to this object to integrate it with standard config API methods.

Properties

static private $attribute_whitelist

A whitelist of shortcode attributes which are allowed in the resultant markup.

Methods

static Config_ForClass
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

mixed
stat(string $name) deprecated

Get inherited config value

mixed
uninherited(string $name)

Gets the uninherited value for the given config option

$this
set_stat(string $name, mixed $value) deprecated

Update the config value for a given property

static mixed
get_shortcodes()

Gets the list of shortcodes provided by this handler

static string
handle_shortcode(array $arguments, string $content, ShortcodeParser $parser, string $shortcode, array $extra = [])

Embed shortcode parser from Oembed. This is a temporary workaround.

static string
embeddableToHtml(Embeddable $embeddable, array $arguments)

No description

static string
embedForTemplate(Adapter $embed, array $arguments) deprecated

No description

static void
flushCachedShortcodes(ShortcodeParser $parser, string $content)

No description

Details

static Config_ForClass config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

Return Value

Config_ForClass

mixed stat(string $name) deprecated

deprecated 5.0 Use ->config()->get() instead

Get inherited config value

Parameters

string $name

Return Value

mixed

mixed uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

$this set_stat(string $name, mixed $value) deprecated

deprecated 5.0 Use ->config()->set() instead

Update the config value for a given property

Parameters

string $name
mixed $value

Return Value

$this

static mixed get_shortcodes()

Gets the list of shortcodes provided by this handler

Return Value

mixed

static string handle_shortcode(array $arguments, string $content, ShortcodeParser $parser, string $shortcode, array $extra = [])

Embed shortcode parser from Oembed. This is a temporary workaround.

Oembed class has been replaced with the Embed external service.

Parameters

array $arguments

Arguments passed to the parser

string $content

Raw shortcode

ShortcodeParser $parser

Parser

string $shortcode

Name of shortcode used to register this handler

array $extra

Extra arguments

Return Value

string

Result of the handled shortcode

static string embeddableToHtml(Embeddable $embeddable, array $arguments)

Parameters

Embeddable $embeddable
array $arguments

Return Value

string

static string embedForTemplate(Adapter $embed, array $arguments) deprecated

deprecated 4.11.0 Use embeddableToHtml() instead

Parameters

Adapter $embed
array $arguments

Additional shortcode params

Return Value

string

static void flushCachedShortcodes(ShortcodeParser $parser, string $content)

Parameters

ShortcodeParser $parser
string $content

Return Value

void