Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author dpowney

    (@dpowney)

    Hi brainburner,

    Do you mean shortcodes.php? I just found these attributes are not being passed to the underlying API.

    There is no option to pass in a before_title or after_title for the Top Rating Result widget.

    Thanks,
    Daniel

    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’
    ) );

    Plugin Author dpowney

    (@dpowney)

    I’m a bit confused. There is not an option for the Top Rating Results widget to pass in before_title or after_title. But the shortcode [display_top_rating_results] has the bug you’ve identified above. I’ve added the lines above to the shortcode.php file and this will be available in the next release of the plugin. Thanks,

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Missing template in widget’ is closed to new replies.