wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



untrailingslashit › WordPress Function

Seit2.2.0
Veraltetn/v
untrailingslashit ( $value )
Parameter:
  • (string) $text Value from which trailing slashes will be removed.
    Erforderlich: Ja
Gibt zurück:
  • (string) String without the trailing slashes.
Definiert in:
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.


Quellcode

function untrailingslashit( $value ) {
	return rtrim( $value, '/\\' );
}