content_url

返回实际的wp-content目录

描述

The content_url template tag retrieves the url to the content area for the current site with the appropriate protocol, ‘https’ if is_ssl() and ‘http’ otherwise.

用法

<?php content_url$path ); ?>

Default Usage

<?php $url content_url(); ?>

参数

$path

(string) (可选) Path relative to the content url.

默认值: None

示例

Output: http://www.example.com/wp-content (without end /)

注意

  • 使用到 WP_CONTENT_URL;

相关

WordPress Directories:
home_url() Home URL http://www.example.com
site_url() Site directory URL http://www.example.com or http://www.example.com/wordpress
admin_url() Admin directory URL http://www.example.com/wp-admin
includes_url() Includes directory URL http://www.example.com/wp-includes
content_url() Content directory URL http://www.example.com/wp-content
plugins_url() Plugins directory URL http://www.example.com/wp-content/plugins
theme_url() Themes directory URL (#18302) http://www.example.com/wp-content/themes
wp_upload_dir() Upload directory URL (returns an array) http://www.example.com/wp-content/uploads

上一篇:
下一篇:

总计 0 评论

发表评论

作为 登录 | 登出 »

人气排行

联系电话

18321263196

交换链接

互相学习

服务咨询

我的微信