lightbox selector

//lightbox selector for other pics than gallery
add_filter('the_content', 'addlightboxrel_replace'); function addlightboxrel_replace ($content)
{   global $post;
    $pattern = "/?)href=('|\")(.?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
    $replacement = '';
    $content = preg_replace($pattern, $replacement, $content);
    return $content;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

© 2020 Jakob Helmer - Powered by WordPress - @trails&tribulations