WordPress: Function Reference/wp get attachment url:修订间差异
来自站长百科
无编辑摘要 |
无编辑摘要 |
||
第1行: | 第1行: | ||
==描述 == | ==描述 == | ||
2008年7月24日 (四) 16:23的版本
描述
Returns a full URI for an attachment file or false on failure.
返回附属文件完全URI或者没有URI,返回false
<!—当你向一篇文章插入附属设置,并且选择链接到文件的时候,Wordpress使用这个函数,产生一个链接-->
Example usage & output
例子用法 &输出
%%%<?php echo wp_get_attachment_url(12); ?>%%% outputs something like http://wp.example.net/wp-content/uploads/filename
%%%<?php echo wp_get_attachment_url(12); ?>%%% 产出内容像http://wp.example.net/wp-content/uploads/文件名
Parameters
参数
Related
相关的
Description
描述
You can change the output of this function through the wp_get_attachment_url filter.
你可以通过wp_get_attachment_url过滤器更改这个函数的输出。
If you want a URI for the attachment page, not the attachment file itself, you can use get_attachment_link.
如果你想要附属网页的URI,而不是附属文件本身,你可以使用get_attachment_link。