Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



trailingslashit ›

Od1.2.0
Przestarzałyn/a
trailingslashit ( $string )
Parametry:
  • (string) $string What to add the trailing slash to.
    Wymagane: Tak
Powrót:
  • (string) String with trailing slash added.
Zdefiniowane na:
Codex:

Appends a trailing slash.

Will remove trailing forward and backslashes if it exists already before adding a trailing forward slash. This prevents double slashing a string or path.

The primary use of this is for paths and thus should be used for paths. It is not restricted to paths and offers no specific path support.



Źródło

function trailingslashit( $string ) {
	return untrailingslashit( $string ) . '/';
}