WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Most Commented Widget] [Bug Fix] List of items not correctly generated (2 posts)

  1. mdejong83
    Member
    Posted 4 years ago #

    On line 68 there's a fault in the written code that makes the list to be generated in a wrong way.

    the original code starting from line 68 is:

    if ( $title )
    $output = $before_title . $title . $after_title . $output;
    if ( !array_key_exists( 'not_widget', $instance ) )
    $output = $before_widget . '<ul>' . $output . '</ul>' . $after_widget;

    Which should be:

    if ( !array_key_exists( 'not_widget', $instance ) )
    $output = $before_widget . ($title ? $before_title . $title . $after_title : '') . '<ul>' . $output . '</ul>' . $after_widget;

    This will generate the list of posts in the correct way with it's own <ul> to nest tis own <li> in.

    http://wordpress.org/extend/plugins/most-commented/

  2. Nick Momrik
    Member
    Posted 4 years ago #

    Thanks! Just committed a fix.

Topic Closed

This topic has been closed to new replies.

About this Topic