返回介绍

includes_url()

发布于 2017-09-11 01:02:37 字数 3196 浏览 1200 评论 0 收藏 0

includes_url( string $path = '',  string $scheme = null )

Retrieves the URL to the includes directory.


description


参数

$path

(string) (Optional) Path relative to the includes URL.

Default value: ''

$scheme

(string) (Optional) Scheme to give the includes URL context. Accepts 'http', 'https', or 'relative'.

Default value: null


返回值

(string) Includes URL link with optional path appended.


源代码

File: wp-includes/link-template.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 );
}

更新日志

Versiondescription
2.6.0Introduced.

相关函数

Uses

  • wp-includes/link-template.php: includes_url
  • wp-includes/link-template.php: site_url()
  • wp-includes/plugin.php: apply_filters()

Used By

  • wp-includes/class-wp-editor.php: _WP_Editors::get_baseurl()
  • wp-includes/class-wp-editor.php: _WP_Editors::default_settings()
  • wp-includes/media.php: wpview_media_sandbox_styles()
  • wp-admin/includes/ajax-actions.php: wp_ajax_parse_embed()
  • wp-admin/includes/ms.php: _thickbox_path_admin_subfolder()
  • wp-admin/includes/media.php: media_upload_form()
  • wp-includes/formatting.php: translate_smiley()
  • wp-includes/general-template.php: wlwmanifest_link()
  • wp-includes/widgets/class-wp-widget-rss.php: WP_Widget_RSS::widget()
  • wp-includes/media.php: wp_plupload_default_settings()
  • wp-includes/post.php: wp_mime_type_icon()
  • wp-includes/script-loader.php: wp_default_scripts()
  • Show 7 more used by Hide more used by

User Contributed Notes

  1. Skip to note content You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note Contributed by Codex

    Example

    
    $url = includes_url();
    echo $url;
    
    

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文