检索包含目录的URL。
原型
includes_url( string $path = '', string $scheme = null )
参数
$path
(string)
(Optional)
相对于包含URL的路径。
$scheme
(string)
(Optional)
提供包含URL上下文的方案。接受’http’,‘https’或’亲戚’。
返回值
(string)
包括附加了可选路径的URL链接。
源文件
路径:wp-includes/link-template.php
<?php
...
function includes_url( $path = '', $scheme = null ) {
$url = site_url( '/' . WPINC . '/', $scheme );
if ( $path && is_string( $path ) )
$url .= ltrim($path, '/');
/**
* Filters the URL to the includes directory.
*
* @since 2.8.0
*
* @param string $url The complete URL to the includes directory including scheme and path.
* @param string $path Path relative to the URL to the wp-includes directory. Blank string
* if no path is specified.
*/
return apply_filters( 'includes_url', $url, $path );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/includes_url/