WordPress.org

Support

Support » Plugins and Hacks » Fixes for the invalid XHTML with the Elegant Twitter Widget

Fixes for the invalid XHTML with the Elegant Twitter Widget

  • Justin Tadlock

    @greenshady

    WordPress God

    I wasn’t sure where to leave this for the plugin author. I hope this finds him. The plugin is stated as having valid XHTML, but this is not always the case. Maybe it’ll help with the next version of the plugin.

    The plugin makes the assumption that all widget areas have markup such as this, which is not an assumption we can make:

    <ul>
    	<li></li>
    	<li></li>
    </ul>

    Lines 24 – 26 of elegant-twitter-widget.php:

    <li id="twitter-sidebar" class="widget widget_twitter">
    
    	<h3 class="widgettitle">twitter</h3>
    
    	<ul id="twitter-list">

    Are marked up incorrectly. They should look like this:

    <?php
    	echo $before_widget;
    	echo $before_title . 'Twitter' . $after_title;
    ?>
    	<ul id="twitter-list">

    Line 51:

    </li>

    Should be:

    <?php echo $after_widget; ?>

    I would also argue that it’d be beneficial to allow users to input their own custom widget title.

    http://wordpress.org/extend/plugins/elegant-twitter-widget/

  • The topic ‘Fixes for the invalid XHTML with the Elegant Twitter Widget’ is closed to new replies.
Skip to toolbar