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



path_join › WordPress Function

Da2.5.0
Deprecaton/a
path_join ( $base, $path )
Parametri: (2)
  • (string) $base Base path.
    Richiesto:
  • (string) $path Path relative to $base.
    Richiesto:
Ritorna:
  • (string) The path with the base or absolute path.
Definito a:
Codex:

Joins two filesystem paths together.

For example, 'give me $path relative to $base'. If the $path is absolute, then it the full path is returned.


Sorgenti

function path_join( $base, $path ) {
	if ( path_is_absolute( $path ) ) {
		return $path;
	}

	return rtrim( $base, '/' ) . '/' . $path;
}