Advertisements

get_attachment_innerHTML

Definition:
function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {}

Retrieve HTML content of image element.

Parameters

  • int $id: Optional. Post ID.
  • bool $fullsize: Optional, default to false. Whether to have full size image.
  • array $max_dims: Optional. Dimensions of image.

Defined filters

  • attachment_innerHTML
    apply_filters('attachment_innerHTML', $innerHTML, $post->ID)

Source code

function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {

	_deprecated_function( __FUNCTION__, '2.5', '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);

}

1158

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: