Advertisements

get_image_send_to_editor

Definition:
function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') {}

Parameters

  • unknown_type $id
  • unknown_type $alt
  • unknown_type $title
  • unknown_type $align
  • unknown_type $url
  • unknown_type $rel
  • unknown_type $size
  • $caption

Defined filters

  • image_send_to_editor
    apply_filters( 'image_send_to_editor', $html, $id, $caption, $title, $align, $url, $size, $alt )

Source code

function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') {



	$html = get_image_tag($id, $alt, $title, $align, $size);



	$rel = $rel ? ' rel="attachment wp-att-' . esc_attr($id).'"' : '';



	if ( $url )

		$html = '<a href="' . esc_attr($url) . "\"$rel>$html</a>";



	$html = apply_filters( 'image_send_to_editor', $html, $id, $caption, $title, $align, $url, $size, $alt );



	return $html;

}

1424

Advertisements

Trackbacks/Pingbacks

  1. Erster! – Die Namics Blogs neu auf Wordpress. Das technische Gedöns. – Namics Weblog - November 16, 2011

    […] neuen Posts erhalten automatisch eine Lightbox via Fancybox. Dafür habe ich den WordPress Filter image_send_to_editor verwendet um die CSS Klasse “fancybox” auf dem Bildlink zu setzen. Ebenfalls notwendig […]

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: