Plugin Directory

Changeset 1369073


Ignore:
Timestamp:
03/11/2016 10:17:07 AM (10 years ago)
Author:
iyas0s
Message:

version 1.0 fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wui-lightbox/tags/1.0/includes/wui_lightbox_functions.php

    r1369040 r1369073  
    77        <?php
    88        if(get_option('wui_lbs_show') == 'all'){ ?>
    9             $('a').each(function( index ) {
    10                 if($(this).children() && $(this).children().prop("tagName") == 'IMG'){
     9            $('a').each(function( index ) { 
     10                if(/\.(?:jpg|jpeg|gif|png)$/i.test($(this).attr('href'))){
    1111                    $(this).attr( "data-uk-lightbox" , "" );
    1212                }
     
    1515        if(get_option('wui_lbs_show') == 'class'){ ?>
    1616            $('a.wui_lightbox').each(function( index ) {
    17                 $(this).attr( "data-uk-lightbox" , "" );
     17                if(/\.(?:jpg|jpeg|gif|png)$/i.test($(this).attr('href'))){
     18                    $(this).attr( "data-uk-lightbox" , "" );
     19                }
    1820            });
    19         <?php } 
     21        <?php }
    2022        if( get_option('wui_lbs_gallery') == 'true' ){ ?>
    2123            $('ul').each(function( index ) {
Note: See TracChangeset for help on using the changeset viewer.