wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_basename › WordPress Function

Da3.1.0
Deprecaton/a
wp_basename ( $path, $suffix = '' )
Parametri: (2)
  • (string) $path A path.
    Richiesto:
  • (string) $suffix If the filename ends in suffix this will also be cut off.
    Richiesto: No
    Default: (vuoto)
Ritorna:
  • (string)
Definito a:
Codex:

i18n-friendly version of basename().



Sorgenti

function wp_basename( $path, $suffix = '' ) {
	return urldecode( basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) );
}