\DevOwl\DeliverAnonymousAssetDeliverAnonymousAsset

Deliver anonymous assets through `wp-content/uploads`.

Summary

Methods
Properties
Constants
__construct()
deleteOldHashes()
ready()
getFullPathToFile()
attribute_escape()
script_loader_tag()
getBuilder()
getHandle()
getFile()
getContentUrl()
getContentDir()
uninstall()
No public properties found
No constants found
hooks()
generateSrc()
No protected properties found
N/A
No private methods found
$builder
$handle
$file
N/A

Properties

$handle

$handle :

Type

$file

$file :

Type

Methods

deleteOldHashes()

deleteOldHashes(array<mixed,string>  $deletedHashes)

Delete all outdated files.

Parameters

array<mixed,string> $deletedHashes

ready()

ready()

The handle is enqueued, let's modify the `WP_Dependency`.

getFullPathToFile()

getFullPathToFile(string  $hash)

Get the full path to a file with a given hash.

Parameters

string $hash

attribute_escape()

attribute_escape(string  $safe_text)

Modify CData script tag.

Parameters

string $safe_text

The text after it has been escaped.

script_loader_tag()

script_loader_tag(string  $tag,string  $handle)

Modify tags to now show any `id` attribute.

Parameters

string $tag

The <script> tag for the enqueued script.

string $handle

The script's registered handle.

getBuilder()

getBuilder()

Getter.

getHandle()

getHandle()

Get handle.

getFile()

getFile()

Get file.

getContentUrl()

getContentUrl()

Get the content directory URL.

getContentDir()

getContentDir(): string|false

Get the content directory and also ensure it is created.

Returns

string|false —

Returns false if the folder could not be created.

uninstall()

uninstall(string  $table_name,string  $handle,array<mixed,string>  $extensions = array())

Remove the files from filesystem. Use this function in your `uninstall.php`.

Parameters

string $table_name
string $handle
array<mixed,string> $extensions

hooks()

hooks()

Create hooks.

generateSrc()

generateSrc()

Generate the file in our content directory and return the URL.