• Resolved cappellania.uniroma3

    (@cappellaniauniroma3)


    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.

    https://wordpress.org/plugins/awesome-social-icons/

Viewing 1 replies (of 1 total)
  • Plugin Author Daniyal Ahmed (a11n)

    (@daniyalahmedk)

    Hey cappellania.uniroma3.
    Thank you for using Awesome Social Icons.
    Thanks for pointing me toward this bug. However now i have fixed this issue in new version 1.2

    Best Regards
    Daniyal.

Viewing 1 replies (of 1 total)
  • The topic ‘bug in closing div’ is closed to new replies.