• currently ‘nobox’ dont work

    wp-lightbox-2.php row 190

    old
    $pattern = “/(<a(?![^>]*?rel=[‘\”]lightbox.*)[^>]*?href=[‘\”][^’\”]+?\.(?:bmp|gif|jpg|jpeg|png)\?{0,1}\S{0,}[‘\”][^\>]*)(rel=[‘\”])(.*?)>/i”;

    new thats work
    $pattern = “/(<a(?![^>]*?rel=[‘\”](lightbox|nobox).*)[^>]*?href=[‘\”][^’\”]+?\.(?:bmp|gif|jpg|jpeg|png)\?{0,1}\S{0,}[‘\”][^\>]*)(rel=[‘\”])(.*?)>/i”;

    https://wordpress.org/plugins/wp-lightbox-2/

Viewing 4 replies - 1 through 4 (of 4 total)
  • jshock

    (@jshock)

    Having the same problem. I have rel=”nobox” for a particular link set, but it doesn’t work. Unfortunately it is a local developmental site, so I can’t provide a link.

    Thread Starter Troll

    (@chaosgod)

    try to use my workaround

    its work

    Confirming this issue that the rel="nobox" attribute did not prevent the plugin from showing the lightbox for images I tagged with it.

    Also confirming that Troll’s fix of adding an or condition looking for it to the regex pattern at line 190 fixes the issue.

    Thanks Troll 🙂

    Just a note to add that if pasting Troll’s code, you may need to change the single and double inverted commas from ‘curly’ ones to ‘straight’ ones to get it to work (which it then does).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘nobox dosnt work’ is closed to new replies.