[英]WordPress equivalent of Drupal's url()
Check out the file link-template.php
in wp-includes
. 在
wp-includes
中wp-includes
出文件link-template.php
。
It's full of useful URL functions! 它充满了有用的URL函数! (also check out
category-template.php
for get_category_link()
and get_tag_link()
). (另请
get_category_link()
category-template.php
以获得get_category_link()
和get_tag_link()
)。
According to the documentation for the drupal function I think the closest thing you're gonna find is site_url(). 根据drupal函数的文档,我认为您会找到的最接近的东西是site_url()。
/**
* Retrieve the site url for the current site.
*
* Returns the 'site_url' option with the appropriate protocol, 'https' if
* is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
* overridden.
*
* @package WordPress
* @since 2.6.0
*
* @uses get_site_url()
*
* @param string $path Optional. Path relative to the site url.
* @param string $scheme Optional. Scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin'.
* @return string Site url link with optional path appended.
*/
site_url(string path, string scheme);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.