\DevOwl\HeadlessContentBlocker\finderStyleInlineAttributeFinder

Find HTML tags with a potential `style` attribute.

Summary

Methods
Properties
Constants
__construct()
getRegularExpression()
createMatch()
prepareMatch()
createRegexp()
replace()
addCallback()
setFastHtmlTag()
getCallbacks()
getFastHtmlTag()
No public properties found
No constants found
isLinkEscaped()
applyCallbacks()
No protected properties found
N/A
No private methods found
$regexp
$fastHtmlTag
$callbacks
N/A

Properties

$regexp

$regexp :

Type

$callbacks

$callbacks :array<mixed,callable>

Callbacks.

Type

array<mixed,callable>

Methods

__construct()

__construct()

C'tor.

getRegularExpression()

getRegularExpression()

Get regular expression.

createMatch()

createMatch(array  $m): \DevOwl\FastHtmlTag\finder\match\AbstractMatch|false

See `AbstractRegexFinder`.

Parameters

array $m

Returns

\DevOwl\FastHtmlTag\finder\match\AbstractMatch|false —

Returns false if no match got found and we cannot process it

prepareMatch()

prepareMatch(array  $m)

Prepare the result match of a `createRegexp` regexp.

Parameters

array $m

createRegexp()

createRegexp(array<mixed,string>  $searchTags,array<mixed,string>  $searchAttributes)

Create regular expression to catch multiple tags and attributes.

Available matches: $match[0] => Full string $match[1] => All content before the link attribute $match[2] => Used tag $match[3] => Used link attribute $match[4] => Used quote for link attribute $match[5] => Link $match[6] => All content after the link

Parameters

array<mixed,string> $searchTags
array<mixed,string> $searchAttributes

replace()

replace(string  $html)

Find HTML tags for this finder and replace it with our modifiers.

Parameters

string $html

addCallback()

addCallback(callable  $callback)

Add a callable. The first parameter is an instance of `AbstractMatch`.

Parameters

callable $callback

getCallbacks()

getCallbacks()

Getter.

getFastHtmlTag()

getFastHtmlTag()

Getter.

isLinkEscaped()

isLinkEscaped(string  $link)

Do not modify escaped data as they appear mostly in JSON CDATA - we do not modify behavior of other plugins and themes ;-)

Parameters

string $link