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



untrailingslashit › WordPress Function

Depuis2.2.0
Dépréciéen/a
untrailingslashit ( $value )
Paramètres:
  • (string) $text Value from which trailing slashes will be removed.
    Requis: Oui
Retourne:
  • (string) String without the trailing slashes.
Défini(e) dans:
Codex:

Removes trailing forward slashes and backslashes if they exist.

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 untrailingslashit( $value ) {
	return rtrim( $value, '/\\' );
}