1 icon.inc _icon_from_core($icon_name)

Checks if core provides an icon.

Do not call this function directly. Use icon() instead.

@private

Parameters

string $icon_name: The icon name to be located.

Return value

string|void: The path to the icon if found.

See also

icon()

File

core/includes/icon.inc, line 223
Provides the Backdrop API for placing icons.

Code

function _icon_from_core($icon_name) {
  // Finally, check for an icon in the misc/icons directory.
  $misc_icon_path = 'core/misc/icons/' . $icon_name . '.svg';
  if (file_exists($misc_icon_path)) {
    return $misc_icon_path;
  }
}