Assets
in package

Tags
since
1.0

Table of Contents

$mediaScripts  : array<string|int, string>
$scripts  : array<string|int, mixed>
$styles  : array<string|int, mixed>
__construct()  : mixed
addCssDependency()  : mixed
addJsDependency()  : mixed
enqueueBundle()  : self
enqueueMedia()  : self
enqueueScript()  : self
enqueueStyle()  : self
enqueueTranslations()  : self
getDependentScripts()  : mixed
getDependentStyles()  : mixed
initAssets()  : mixed
registerAssets()  : mixed
registerScript()  : self
registerStyle()  : self
addActions()  : mixed
addDependencyTo()  : mixed
addFlatpickrLocalization()  : mixed
getDependentsOf()  : mixed
initLocalizations()  : mixed

Properties

$mediaScripts

protected array<string|int, string> $mediaScripts = []
Tags
since
1.2.1

$scripts

protected array<string|int, mixed> $scripts = []
Tags
since
1.0

$styles

protected array<string|int, mixed> $styles = []
Tags
since
1.0

Methods

__construct()

public __construct() : mixed
Tags
since
1.0
Return values
mixed

addCssDependency()

public addCssDependency(string $handle, string|callable $dependency) : mixed
Parameters
$handle : string
$dependency : string|callable

New dependency or callback to filter dependencies.

Tags
since
1.0
Return values
mixed

addJsDependency()

public addJsDependency(string $handle, string|callable $dependency) : mixed
Parameters
$handle : string
$dependency : string|callable

New dependency or callback to filter dependencies.

Tags
since
1.0
Return values
mixed

enqueueBundle()

public enqueueBundle(array<string|int, string> ...$handles) : self
Parameters
$handles : array<string|int, string>
Tags
since
1.0
Return values
self

enqueueMedia()

public enqueueMedia(array<string|int, string> ...$handles) : self
Parameters
$handles : array<string|int, string>
Tags
since
1.2.1
Return values
self

enqueueScript()

public enqueueScript(array<string|int, string> ...$handles) : self
Parameters
$handles : array<string|int, string>
Tags
since
1.0
Return values
self

enqueueStyle()

public enqueueStyle(array<string|int, string> ...$handles) : self
Parameters
$handles : array<string|int, string>
Tags
since
1.0
Return values
self

enqueueTranslations()

public enqueueTranslations(array<string|int, string> ...$handles) : self
Parameters
$handles : array<string|int, string>
Tags
since
1.2.1
Return values
self

getDependentScripts()

public getDependentScripts(string $dependency) : mixed
Parameters
$dependency : string
Tags
since
1.2.1
Return values
mixed

getDependentStyles()

public getDependentStyles(string $dependency) : mixed
Parameters
$dependency : string
Tags
since
1.2.1
Return values
mixed

initAssets()

public initAssets() : mixed
Tags
access

protected

since
1.0
Return values
mixed

registerAssets()

public registerAssets() : mixed
Tags
access

protected

since
1.0
Return values
mixed

registerScript()

public registerScript(string $handle, string $file[, array<string|int, mixed> $dependencies = [] ][, string $version = '' ][, bool $inFooter = true ]) : self
Parameters
$handle : string
$file : string

Absolute path to the file.

$dependencies : array<string|int, mixed> = []

Optional.

$version : string = ''

Optional. Current version of the plugin by default.

$inFooter : bool = true

Optional. True by default.

Tags
since
1.0
Return values
self

registerStyle()

public registerStyle(string $handle, string $file[, array<string|int, mixed> $dependencies = [] ][, string $version = '' ][, string $media = 'all' ]) : self
Parameters
$handle : string
$file : string

Absolute path to the file.

$dependencies : array<string|int, mixed> = []

Optional.

$version : string = ''

Optional. Current version of the plugin by default.

$media : string = 'all'

Optional. 'all' by default.

Tags
since
1.0
Return values
self

addActions()

protected addActions() : mixed
Tags
since
1.0
Return values
mixed

addDependencyTo()

protected addDependencyTo(array<string|int, mixed> &$assets, string $handle, string|callable $dependency) : mixed
Parameters
$assets : array<string|int, mixed>
$handle : string
$dependency : string|callable
Tags
since
1.0
Return values
mixed

addFlatpickrLocalization()

protected addFlatpickrLocalization(string $language) : mixed
Parameters
$language : string
Tags
since
1.2.1
Return values
mixed

getDependentsOf()

protected getDependentsOf(array<string|int, mixed> &$assets, string $dependency) : mixed
Parameters
$assets : array<string|int, mixed>
$dependency : string
Tags
since
1.2.1
Return values
mixed

initLocalizations()

protected initLocalizations() : mixed
Tags
since
1.2.1
Return values
mixed

Search results