bug in closing div
-
The internal “div” tag in the widget is not closed correctly, and winds up messing up any other widgets that come after this widget.
The current code in awesomesocial.php:
<?php function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); $options = get_option('awesome_social_options'); echo "<div>"; if (!empty($title)) echo $before_title . $title . $after_title; ; $makeawesome_icons = new Making_Awesome_Icons; // Getting Icons for widget $makeawesome_icons->Create_Awesome_Icons(); echo $after_widget; echo "</div>"; } ?>
As you can see, the closing div tag and $after_widget are swapped, and the result is that the closing div tag is actually outside of the widget. (Besides the extra semi-colon that can be removed.) It should be:
<?php function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); $options = get_option('awesome_social_options'); echo "<div>"; if (!empty($title)) echo $before_title . $title . $after_title; $makeawesome_icons = new Making_Awesome_Icons; // Getting Icons for widget $makeawesome_icons->Create_Awesome_Icons(); echo "</div>"; echo $after_widget; } ?>
Please fix.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘bug in closing div’ is closed to new replies.