get_attachment_innerhtml
函数
get_attachment_innerhtml ( $id = 0, $fullsize = false, $max_dims = false )
- 参数
-
-
(int)
$id
Optional. Post ID.- Required: 否
-
(bool)
$fullsize
Optional. Whether to have full size image. Default false.- Required: 否
- Default: false
-
(array)
$max_dims
Optional. Dimensions of image.- Required: 否
- Default: false
-
(int)
- 返回值
-
- (string|false)
- 相关
-
- wp_get_attachment_image()
- 定义位置
-
-
wp-includes/deprecated.php
, line 1993
-
wp-includes/deprecated.php
- 引入
- 2.0.0
- 弃用
- 2.5.0
Retrieve HTML content of image element.
function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) { _deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image()' ); $id = (int) $id; if ( !$post = get_post($id) ) return false; if ( $innerHTML = get_attachment_icon($post->ID, $fullsize, $max_dims)) return $innerHTML; $innerHTML = esc_attr($post->post_title); return apply_filters('attachment_innerHTML', $innerHTML, $post->ID); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。