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.

Config options

attribute_whitelist array

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

Properties

Methods

public static 
config()

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

public
mixed
stat(string $name) deprecated

Get inherited config value

public
mixed
uninherited(string $name)

Gets the uninherited value for the given config option

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

Update the config value for a given property

public static 
mixed
get_shortcodes()

Gets the list of shortcodes provided by this handler

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

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

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

No description

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

No description

protected static 
string
videoEmbed(array $arguments, string $content)

Build video embed tag

protected static 
string
linkEmbed(array $arguments, string $href, string $title)

Build embed tag

protected static 
string
photoEmbed(array $arguments, string $src)

Build img embed tag

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

No description

Parameters

Embeddable $embeddable
array $arguments

Return Value

string

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

deprecated 4.11.0 Use embeddableToHtml() instead

No description

Parameters

Adapter $embed
array $arguments

Additional shortcode params

Return Value

string

static protected string videoEmbed(array $arguments, string $content)

Build video embed tag

Parameters

array $arguments
string $content

Raw HTML content

Return Value

string

static protected string linkEmbed(array $arguments, string $href, string $title)

static protected string photoEmbed(array $arguments, string $src)

Build img embed tag

Parameters

array $arguments
string $src

Return Value

string

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

No description

Parameters

ShortcodeParser $parser
string $content

Return Value

void