wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



trailingslashit › WordPress Function

Depuis1.2.0
Dépréciéen/a
trailingslashit ( $value )
Paramètres:
  • (string) $value Value to which trailing slash will be added.
    Requis: Oui
Retourne:
  • (string) String with trailing slash added.
Défini(e) dans:
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.


Source

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