image_media_send_to_editor

Definition:
function image_media_send_to_editor($html, $attachment_id, $attachment) {}

Parameters

  • unknown_type $html
  • unknown_type $attachment_id
  • unknown_type $attachment

Source code

function image_media_send_to_editor($html, $attachment_id, $attachment) {

	$post =& get_post($attachment_id);

	if ( substr($post->post_mime_type, 0, 5) == 'image' ) {

		$url = $attachment['url'];

		$align = !empty($attachment['align']) ? $attachment['align'] : 'none';

		$size = !empty($attachment['image-size']) ? $attachment['image-size'] : 'medium';

		$alt = !empty($attachment['image_alt']) ? $attachment['image_alt'] : '';

		$rel = ( $url == get_attachment_link($attachment_id) );



		return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size, $alt);

	}



	return $html;

}

1997

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 )

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: