wpseek.com
WordPress开发者和主题制作者的搜索引擎



trailingslashit › WordPress Function

Since1.2.0
已弃用n/a
trailingslashit ( $value )
参数:
  • (string) $value Value to which trailing slash will be added.
    Required: Yes
返回:
  • (string) String with trailing slash added.
定义在:
文档:

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.


源码

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