WPDev.one
Core Function
View Source on Trac ↗

wp_basename()

wp_basename( mixed $path, mixed $suffix = '' )

i18n-friendly version of basename().

Parameters 1 required

Name / Type Description
$path
string

A path.

Required
$suffix
string

If the filename ends in suffix this will also be cut off.

Return Value

(string)
string

Function Information

Since Version
3.1.0
Source File
wp-includes/formatting.php
Advertisement