Add Any Lightbox

rel="lightbox", class="colorbox".', 'addanylightbox' ) ?>

[id] for example rel="prettyPhoto[id]".', 'addanylightbox' ) ?>

Images:

Flash:

ID. ']'; $addanylightbox_replacement = preg_replace( '/\[(id)\]/', $addpostid, get_option( 'addanylightbox' ) ); $replacement = '$7'; $content = preg_replace( '/]*).(bmp|gif|jpeg|jpg|png)(\'|")(.*?)>(.*?)<\/a>/i', $replacement, $content ); return $content; } function addanylightbox_flash_replace( $content ) { global $post; $addpostid = '[' .$post->ID. ']'; $addanylightbox_flash_replacement = preg_replace( '/\[(id)\]/', $addpostid, get_option( 'addanylightbox_flash' ) ); $replacement = '$7'; $content = preg_replace( '/]*).(swf|flv)(\'|")(.*?)>(.*?)<\/a>/i', $replacement, $content ); return $content; } //if options set add filters if ( get_option( 'addanylightbox' ) != null) { add_filter( 'the_content', 'addanylightbox_replace', 12 ); add_filter( 'get_comment_text', 'addanylightbox_replace', 12 ); } if ( get_option( 'addanylightbox_flash' ) != null) { add_filter( 'the_content', 'addanylightbox_flash_replace', 13 ); add_filter( 'get_comment_text', 'addanylightbox_flash_replace', 13 ); } ?>