Documentation

PluginAutoplay extends Autoplay
in package
Uses UtilsProvider

Enhanced `Autoplay` plugin to enable plugin and theme compatibilities.

Table of Contents

Constants

HTML_ATTRIBUTE_ALTERNATIVE_SRC  = 'data-src'
Some plugins are using `data-src` (e.g. Thrive Architect) to provide the iframe to the frontend.
HTML_ATTRIBUTE_SRC  = 'src'
HTML_TAG_DIV  = 'div'
HTML_TAG_EMBED  = 'embed'
HTML_TAG_IFRAME  = 'iframe'

Properties

$headlessContentBlocker  : mixed

Methods

__construct()  : mixed
C'tor.
afterSetup()  : mixed
The content blocker got setup completely.
beforeMatch()  : mixed
Called before a match got found.
blockableStringExpression()  : string
Allows to modify the passed string expression to a blockable.
blockedMatch()  : mixed
See `AbstractPlugin`.
checkResult()  : BlockedResult
Called after a match got found and the matcher decided, if it should be blocked or not.
getHeadlessContentBlocker()  : mixed
Getter.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
init()  : mixed
Initialize your plugin add e.g. new visual parent definitions.
inlineStyleBlockRule()  : bool
Decide if a URL in a CSS rule should be blocked.
inlineStyleModifyDocuments()  : bool
Allows to modify blocked CSS documents.
inlineStyleShouldBeExtracted()  : bool
Do not extract blocked rules of a CSS inline script to a second document.
keepAlwaysAttributes()  : array<string|int, string>
Keep attributes for a specific match.
modifyHtmlAfterProcessing()  : mixed
Allows to modify the HTML after the content blocker has done its job.
notBlockedMatch()  : mixed
Called after a match got not blocked. Opposite of `blockedMatch`.
setup()  : mixed
Before the content blocker gets setup.
skipInlineScriptVariableAssignment()  : array<string|int, string>
Skip inline script by variable name.
visualParent()  : bool|string|number
Set a visual parent for a specific match.
transformUrl()  : mixed
Transform a given YouTube / Vimeo URL to autoplay URL.

Constants

HTML_ATTRIBUTE_ALTERNATIVE_SRC

Some plugins are using `data-src` (e.g. Thrive Architect) to provide the iframe to the frontend.

public mixed HTML_ATTRIBUTE_ALTERNATIVE_SRC = 'data-src'

HTML_ATTRIBUTE_SRC

public mixed HTML_ATTRIBUTE_SRC = 'src'

HTML_TAG_DIV

public mixed HTML_TAG_DIV = 'div'

HTML_TAG_EMBED

public mixed HTML_TAG_EMBED = 'embed'

HTML_TAG_IFRAME

public mixed HTML_TAG_IFRAME = 'iframe'

Properties

Methods

afterSetup()

The content blocker got setup completely.

public afterSetup() : mixed

blockableStringExpression()

Allows to modify the passed string expression to a blockable.

public blockableStringExpression(string $expression, AbstractBlockable $blockable) : string
Parameters
$expression : string
$blockable : AbstractBlockable
Return values
string

blockedMatch()

See `AbstractPlugin`.

public blockedMatch(BlockedResult $result, AbstractMatcher $matcher, AbstractMatch $match) : mixed
Parameters
$result : BlockedResult
$matcher : AbstractMatcher
$match : AbstractMatch

getHeadlessContentBlocker()

Getter.

public final getHeadlessContentBlocker() : mixed
Tags
codeCoverageIgnore

getPluginConstantPrefix()

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

init()

Initialize your plugin add e.g. new visual parent definitions.

public init() : mixed

keepAlwaysAttributes()

Keep attributes for a specific match.

public keepAlwaysAttributes(array<string|int, string> $keepAttributes, AbstractMatcher $matcher, AbstractMatch $match) : array<string|int, string>
Parameters
$keepAttributes : array<string|int, string>
$matcher : AbstractMatcher
$match : AbstractMatch
Return values
array<string|int, string>

modifyHtmlAfterProcessing()

Allows to modify the HTML after the content blocker has done its job.

public modifyHtmlAfterProcessing(string $html) : mixed
Parameters
$html : string

setup()

Before the content blocker gets setup.

public setup() : mixed

skipInlineScriptVariableAssignment()

Skip inline script by variable name.

public skipInlineScriptVariableAssignment(array<string|int, string> $names, ScriptInlineMatcher $matcher, ScriptInlineMatch $match) : array<string|int, string>
Parameters
$names : array<string|int, string>
$matcher : ScriptInlineMatcher
$match : ScriptInlineMatch
Return values
array<string|int, string>

visualParent()

Set a visual parent for a specific match.

public visualParent(bool|string|number $visualParent, AbstractMatcher $matcher, AbstractMatch $match) : bool|string|number
Parameters
$visualParent : bool|string|number
$matcher : AbstractMatcher
$match : AbstractMatch
Return values
bool|string|number

transformUrl()

Transform a given YouTube / Vimeo URL to autoplay URL.

protected transformUrl(string $link) : mixed
Parameters
$link : string

        
On this page

Search results