Bitcoin and Altcoin Wallets 6.2.5

assets.php

Helper functions that retrieve front-end assets (css,js,images).

Tags
since
6.0.0

Introduced.

author

Alexandros Georgiou info@dashed-slug.net

Table of Contents

get_asset_path()  : string
Determine the actual location of an asset.
get_script_path()  : string|null

Functions

get_asset_path()

Determine the actual location of an asset.

get_asset_path(string $name[, string $type = 'script' ][, string $plugin_slug = 'wallets' ]) : string

Autodetects which plugin it was called from. Gives priority to minified, versioned files. This way, if you delete the minified file, the plugin falls back to the unminified asset.

Parameters
$name : string

Base name of asset.

$type : string = 'script'

One of script, style, sprite.

$plugin_slug : string = 'wallets'

The plugin's slug. For this plugin, this is "wallets".

Tags
throws
IllegalArgumentException

If the asset type is invalid.

throws
RuntimeException

If the asset could not be located.

Return values
string

The path to the asset, relative to wordpress base dir.

get_script_path()

get_script_path(string $name) : string|null
Parameters
$name : string
Return values
string|null

Search results