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



untrailingslashit › WordPress Function

Od2.2.0
Przestarzałyn/a
untrailingslashit ( $value )
Parametry:
  • (string) $text Value from which trailing slashes will be removed.
    Wymagane: Tak
Powrót:
  • (string) String without the trailing slashes.
Zdefiniowane na:
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.


Źródło

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