get_attachment_innerHTML()
最后更新于:2021-11-26 04:38:20
get_attachment_innerHTML( int$id, bool$fullsize=false, array$max_dims=false)Retrieve HTML content of image element.
参数
- $id
-
(int) (Optional) Post ID.
- $fullsize
-
(bool) (Optional) Whether to have full size image.
Default value: false
- $max_dims
-
(array) (Optional) Dimensions of image.
Default value: false
响应
(string|false)
源文件
文件: gc-includes/deprecated.php
function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {
_deprecated_function( __FUNCTION__, '2.5.0', 'gc_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);
}