Here is my function:
function insert_img_rel_attrib( $html, $id, $caption, $title, $align, $url )
{
$postID = ???
$rel = "<a rel='shadowbox[".$postID."]'";
if ($url) {$html = str_replace("<a",$rel,$html);}
return $html;
}
add_filter( 'image_send_to_editor', 'insert_img_rel_attrib', 10, 6 );
How do I get the current post ID? I've tried the obvious, global $wp_query;
$postID = $wp_query->post->ID;
etc.