WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. JochenT
    Member
    Posted 2 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 '-'.

    http://wordpress.org/extend/plugins/widgets-in-columns/

  2. shazdeh
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    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

About this Topic