Widgets in Columns
[resolved] Fails for widget IDs greater than 9 (2 posts)

  1. JochenT
    Posted 4 years ago #

    This is a very useful plugin. Other people as well as myself are happy to have found it.

    Nevertheless, there is a malicious bug. Using more than 9 widgets of one widget class will result in errors. The error occurs in your function dynamic_sidebar_params(). The current code is
    $widget_id = substr( strstr( $params[0]['widget_id'], '-' ), -1 );
    It only uses the last character of string $params[0]['widget_id'], which fails if the widget id is 'text-10', for example.

    An alternative code line may be
    $widget_id = substr( $params[0]['widget_id'], strrpos( $params[0]['widget_id'], '-' ) + 1 );
    This gets always the whole part of the string after the last '-'.


  2. shazdeh
    Plugin Author

    Posted 4 years ago #

    yeah, I noticed this about two weeks ago and it has been fixed in 0.2 which will soon be released. It has a new cool Spacer widget too!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Widgets in Columns
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic