includes_url
函数
includes_url ( $path = '', $scheme = null )
- 参数
-
-
(string)
$path
Optional. Path relative to the includes URL. Default empty.- Required: 否
- Default: (empty)
-
(string|null)
$scheme
Optional. Scheme to give the includes URL context. Accepts ‘http’, ‘https’, or ‘relative’. Default null.- Required: 否
- Default: null
-
(string)
- 返回值
-
- (string) Includes URL link with optional path appended.
- 定义位置
-
-
wp-includes/link-template.php
, line 3499
-
wp-includes/link-template.php
- 引入
- 2.6.0
- 弃用
- –
Retrieves the URL to the includes directory.
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 * @since 5.8.0 The `$scheme` parameter was added. * * @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. * @param string|null $scheme Scheme to give the includes URL context. Accepts * 'http', 'https', 'relative', or null. Default null. */ return apply_filters( 'includes_url', $url, $path, $scheme ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。