Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter brainburner

    (@brainburner)

    Yes, the bug is also present in the shortcode.

    But, if I understand it correctly, in widgets.php line #33 you call the same Multi_Rating_API::display_top_rating_results function.

    WordPress will call the function Top_Rating_Results_Widget::widget($args) where $args contains ‘after_title’ and ‘before_title’ (or at least it does with some themes).
    At line #33 you call the Multi_Rating_API::display_top_rating_results ignoring these arguments.

    Propagating the arguments from Top_Rating_Results_Widget::widget($args) to Multi_Rating_API::display_top_rating_results solved the problem on my website.

    Thread Starter brainburner

    (@brainburner)

    I mean the “Top Rating Result widget”.
    Currently the widget doesn’t fit the layout of the template, because the after_title, before_title arguments are not passed to the API.

    Adding the two lines solves it.
    Multi_Rating_API::display_top_rating_results( array(
    ‘limit’ => $limit,
    ‘title’ => $title,
    ‘before_title’ => $before_title,
    ‘after_title’ => $after_title,
    ‘show_category_filter’ => $show_category_filter,
    ‘category_id’ => $category_id,
    ‘class’ => ‘widget’
    ) );

Viewing 2 replies - 1 through 2 (of 2 total)