DeliverAnonymousAsset
in package
Deliver anonymous assets through `wp-content/uploads`.
Table of Contents
Properties
- $builder : AnonymousAssetBuilder
- Builder.
- $file : mixed
- $handle : mixed
Methods
- __construct() : mixed
- C'tor.
- attribute_escape() : mixed
- Modify CData script tag.
- deleteOldHashes() : mixed
- Delete all outdated files.
- getBuilder() : mixed
- Getter.
- getFile() : mixed
- Get file.
- getHandle() : mixed
- Get handle.
- ready() : mixed
- The handle is enqueued, let's modify the `WP_Dependency`.
- script_loader_tag() : mixed
- Modify tags to now show any `id` attribute.
- generateSrc() : mixed
- Generate the file in our content directory and return the URL.
- hooks() : mixed
- Create hooks.
Properties
$builder
Builder.
private
AnonymousAssetBuilder
$builder
$file
private
mixed
$file
$handle
private
mixed
$handle
Methods
__construct()
C'tor.
public
__construct(AnonymousAssetBuilder $builder, string $handle, string $file) : mixed
Parameters
- $builder : AnonymousAssetBuilder
- $handle : string
- $file : string
Tags
attribute_escape()
Modify CData script tag.
public
attribute_escape(string $safe_text) : mixed
Parameters
- $safe_text : string
-
The text after it has been escaped.
deleteOldHashes()
Delete all outdated files.
public
deleteOldHashes(array<string|int, string> $deletedHashes) : mixed
Parameters
- $deletedHashes : array<string|int, string>
Tags
getBuilder()
Getter.
public
getBuilder() : mixed
Tags
getFile()
Get file.
public
getFile() : mixed
Tags
getHandle()
Get handle.
public
getHandle() : mixed
Tags
ready()
The handle is enqueued, let's modify the `WP_Dependency`.
public
ready() : mixed
script_loader_tag()
Modify tags to now show any `id` attribute.
public
script_loader_tag(string $tag, string $handle) : mixed
Parameters
- $tag : string
-
The
<script>
tag for the enqueued script. - $handle : string
-
The script's registered handle.
generateSrc()
Generate the file in our content directory and return the URL.
protected
generateSrc() : mixed
hooks()
Create hooks.
protected
hooks() : mixed