Advertisement
Guest User

my_image_send_to_editor

a guest
Jan 13th, 2012
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function my_image_send_to_editor($html, $id, $alt, $title, $align, $url, $size, $desc ){
  2. $html = get_image_tag($id, $alt, $title, $align, $size);
  3. $image_attributes = wp_get_attachment_image_src( $id, 'full' );
  4. $rel = ' rel="lightbox[post] attachment wp-att-' . esc_attr($id).'"';
  5.  
  6. if ( $url )
  7. $html = '<figure class="align'.esc_attr($align).'"><a href="'. $image_attributes[0] .'" title="'. esc_attr($alt) .'" '. $rel .'>' . $html . '<img class="rollover" src="/ins/wp-content/themes/roots/img/overlay.png" alt="overlay"></a><figcaption>'.esc_attr($desc).'</figcaption></figure>';
  8. return $html;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement