
WordPress调试完整指南(启用WP_DEBUG + 其他工具)
content_url ( $path = '' )
content_url: 这个函数返回WordPress安装中的内容目录的URL。内容目录包含上传的媒体,如图片和视频。
检索内容目录的URL。
function content_url( $path = '' ) { $url = set_url_scheme( WP_CONTENT_URL ); if ( $path && is_string( $path ) ) { $url .= '/' . ltrim( $path, '/' ); } /** * Filters the URL to the content directory. * * @since 2.8.0 * * @param string $url The complete URL to the content directory including scheme and path. * @param string $path Path relative to the URL to the content directory. Blank string * if no path is specified. */ return apply_filters( 'content_url', $url, $path ); }