WordPress.org

Forums

Easing Slider
Empty image link for preloadIcon = none (1 post)

  1. DSmidge
    Member
    Posted 3 years ago #

    Hi,
    I noticed that an image "/wp-content/plugins/easing-slider/images/.gif" is loaded when preloadIcon is set to none. Look at the line 186 in easingslider.php.

    My advice: put everything in if condition.
    As being a programmer myself, I noticed lots of copy-pasted code (for example in line 210 and below). I would use arrays to store non empty image info and then go with for loop.

    Change this:
    <div class="preload" style="<?php if($transition=='fade') echo 'padding-top:1px\9;'; ?>background:url(<?php echo WP_PLUGIN_URL; ?>/easing-slider/images/<?php if($preload=='indicator') echo 'indicator'; if($preload=='none') echo ''; if($preload=='arrows') echo 'arrows'; if($preload=='bar') echo 'bar'; if($preload=='bigflower') echo 'bigflower'; if($preload=='bounceball') echo 'bounceball'; if($preload=='indicatorlight') echo 'indicatorlight'; if($preload=='pik') echo 'pik'; if($preload=='snake') echo 'snake'; ?>.gif) no-repeat center center #<?php if($bgcolour=='') echo 'fff'; else echo $bgcolour; ?>;">
    to:

    <?php if ($preload != 'none') { ?>
    <div class="preload" style="<?php if($transition=='fade') echo 'padding-top:1px\9;'; ?>background:url(<?php echo WP_PLUGIN_URL; ?>/easing-slider/images/<?php echo $preload; ?>.gif) no-repeat center center #<?php if($bgcolour=='') echo 'fff'; else echo $bgcolour; ?>;"><?
    } ?>

    . It's not tested.

    http://wordpress.org/extend/plugins/easing-slider/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic