百度 | 神马 | 搜狗 | 技术文档 | 学习资料分享 - 记录帝国CMS及运维技术的点点滴滴
你的位置:首页 > 实用IT技术 » 正文

【Wordpress相关】WordPress 常用函数 / trailingslashit

发布时间:2020-09-17

WordPress 常用函数 / trailingslashit,

简介

在字符串末尾添加 /

添加之前会删除字符串末尾已有的 /,这样可以防止添加两个 /

用法

<?php trailingslashit( $string ) ?>

参数

$string
(string) (required) 将添加 / 的字符串。
Default: None

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>

返回值

(string)
已经添加 / 的字符串

修改记录

Since: 1.2.0

源文件

wp-includes/formatting.php

Top