wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



trailingslashit › WordPress Function

Desde1.2.0
Obsoleton/a
trailingslashit ( $value )
Parâmetros:
  • (string) $value Value to which trailing slash will be added.
    Required: Yes
Retorna:
  • (string) String with trailing slash added.
Definido em:
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.


Fonte

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