API / Minn\Runtime / AssetQueue

AssetQueue final class

Minn\Runtime\AssetQueue · public/minn/src/Minn/Runtime/AssetQueue.php · 60 lines

The scripts and styles a request queues, as WordPress's asset functions queue them: each kind's registry kept for the request, a handle queued (with the notice for one queued before init), and a script's element, from a file or inline, through the attribute filters.

Public

staticassets(string $kind): Minn\Runtime\Assets#

The request's registry of one kind of asset, script or style, made the first time it is asked for.

staticwarnTooEarly(mixed $function, mixed $handle = ''): void#

The notice (doing it wrong, 3.3.0) for an asset function run before init and before any of the enqueue actions (_wp_scripts_maybe_doing_it_wrong), naming the handle when there is one.

staticenqueueScript(string $handle): void#

A registered script queued (wp_enqueue_script with a handle alone).

staticenqueueStyle(string $handle): void#

A registered style queued (wp_enqueue_style with a handle alone).

statictag(mixed $attributes): string#

A script file's element (wp_get_script_tag), its attributes through wp_script_attributes first.

staticinlineTag(mixed $data, mixed $attributes = array ( )): string#

Inline code's element (wp_get_inline_script_tag): the code trimmed between newlines, wp_inline_script_attributes asked.