Uploads and limitseasy_svg_is_svg_name()

easy_svg_is_svg_name()

Tells whether a file name or path has the extension svg, in any case.

Function · Easy SVG · Status: Internal · Defined in easy-svg.php

Internal: not part of the promised public surface. It may change without notice.

Usage

easy_svg_is_svg_name( string $name ): bool

Example

if ( easy_svg_is_svg_name( $filename ) ) {
	$is_svg = true;
}

Description

Only the extension is checked, never the content. The upload checks use it together with the type WordPress settled on.

Parameters

body
$namestring

File name or path.

Return value

returnbool

True for .svg.