Function __global->find_addon_icon

Definitions

sources/addons.php

  • Find the icon for an addon.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$addon_name ID_TEXT No No required parameter N/A N/A Addon name
$pick_default boolean No No True N/A N/A Whether to use a default icon if not found
$tar_path ?PATH No No Null N/A N/A Path to TAR file (null: don't look inside a TAR / it's installed already)

Returns

  • Theme image URL (may be a "data:" URL rather than a normal URLPATH) (null: not found)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find the icon for an addon.
 *
 * @param  ID_TEXT $addon_name Addon name
 * @param  boolean $pick_default Whether to use a default icon if not found
 * @param  ?PATH $tar_path Path to TAR file (null: don't look inside a TAR / it's installed already)
 * @return ?string Theme image URL (may be a "data:" URL rather than a normal URLPATH) (null: not found)
 */

function find_addon_icon(string $addon_name, bool $pick_default = true, ?string $tar_path = null) : ?string