SVG_Icon

Handles File Icon SVGs

Tags
author

Barn2 Plugins info@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Table of Contents

get()  : string|false
Get the SVG Icon.
get_file_extension_icon()  : string
Get file extension icon.
render()  : mixed
Renders the SVG Icon.
sanitize_svg()  : string
Sanitize the HTML markup of an SVG

Methods

get()

Get the SVG Icon.

public static get(string $key[, array<string|int, mixed> $classes = [] ][, mixed $fill_color = '' ]) : string|false
Parameters
$key : string
$classes : array<string|int, mixed> = []
$fill_color : mixed = ''
Return values
string|false

get_file_extension_icon()

Get file extension icon.

public static get_file_extension_icon(string $extension) : string
Parameters
$extension : string
Return values
string

render()

Renders the SVG Icon.

public static render(string $key[, array<string|int, mixed> $classes = [] ][, mixed $fill_color = '' ]) : mixed
Parameters
$key : string
$classes : array<string|int, mixed> = []
$fill_color : mixed = ''
Return values
mixed

sanitize_svg()

Sanitize the HTML markup of an SVG

public static sanitize_svg(string $svg) : string
Parameters
$svg : string

The markup to be sanitized

Return values
string

The sanitize markup

Search results