[Bug] A couple more bugs with Widget.php
-
Colorbox CSS is loaded even when Colorbox option is not enabled
On line 12 of widget.php, the
add_action
function is always called, even when the$instance['colorbox']
is false. This results in alink
element towp-content/plugins/yakadanda-instagram/css/colorbox-.css
being generated, which results in a 404 errorClicking on images does nothing when Colorbox is not loaded
It’s nice that the widget gives us an option to not use Colorbox, but when Colorbox isn’t loaded I don’t think the images should have
onclick='return false'
on them. Wouldn’t, you know, a link to the images be better?Here’s my modification to the line that outputs the
a
HTML elementecho '<li><a target="_blank" href="' . $datum->link . '" title="' . yinstagram_get_excerpt(str_replace('"', "'", (string) $datum->caption->text)) . '">';
No empty titles?
For some reason on line 16 you decided that the user must have a title – if it’s empty it gets replaced with ‘Yakadanda Instagram’. Why, especially since later on the code, as with most other widget code, accommodate the case where there isn’t? (if
$title
is empty then the title isn’t shown)
- The topic ‘[Bug] A couple more bugs with Widget.php’ is closed to new replies.