返回介绍

wp_get_upload_dir()

发布于 2017-09-11 12:09:44 字数 1715 浏览 1039 评论 0 收藏 0

wp_get_upload_dir()

Retrieves uploads directory information.


description

Same as wp_upload_dir() but "light weight" as it doesn’t attempt to create the uploads directory. Intended for use in themes, when only ‘basedir’ and ‘baseurl’ are needed, generally in all cases when not uploading files.


返回值

(array) See wp_upload_dir() for description.


源代码

File: wp-includes/functions.php

function wp_get_upload_dir() {
	return wp_upload_dir( null, false );
}

更新日志

Version description
4.5.0 Introduced.

相关函数

Uses

  • wp-includes/functions.php: wp_upload_dir()

Used By

  • wp-includes/media.php: wp_calculate_image_srcset()
  • wp-includes/media.php: attachment_url_to_postid()
  • wp-admin/includes/ms.php: wpmu_delete_blog()
  • wp-includes/post.php: wp_delete_attachment()
  • wp-includes/post.php: wp_get_attachment_url()
  • wp-includes/post.php: get_attached_file()
  • wp-includes/post.php: _wp_relative_upload_path()
  • wp-includes/comment.php: discover_pingback_server_uri()
  • Show 3 more used by Hide more used by

User Contributed Notes

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

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

发布评论

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