The Blog

Soon WordPress 3.1 will be released. I’ve tested Dynamic Widgets with the 3.1-RC2 build and found a small glitch in the admin UI. This has been fixed in the development version 1.3.7.5.

When WordPress 3.1 is released, I’l probably also release quite soon after that the next version of Dynamic Widgets. When you want to start using WordPress 3.1 in the meantime, I recommend you to use the development version of Dynamic Widgets.

Thanks to a comment made by Gila, a bug has been found in Dynamic Widgets version 1.3.7 which prevents subsequent widgets with an opposite config for WPML to behave correctly. The bug is fixed in the development version 1.3.7.3.

My apologies for any inconvience caused by this bug.

45

Finally, a bit later than expected a new version of Dynamic Widgets is there. One of the reasons for the delay is a bug found by Mike from The Minor Site which took some time to get it fixed. It turned out when the bug was already fixed the Suffusion theme he is using, acted funny by passing unrealistic data to Dynamic Widgets which in its turn got confused. Luckily we got around it by switching the plugin to ‘OLD’ method.

Anyway, I’ve just released version 1.3.7. Compared to the previous version, the following has been added and fixed:

  • Added more l10n text strings.
  • Added French language files (locale: fr_FR) – Merci beaucoup Alexis!
  • Added language (WPML) as an option.
  • Added hierarchical inheritance support for Pages and Custom Post Types
  • Bugfix for unexpected behavior when two widgets are in opposite config of eachother.
  • Fixed a couple of l10n text strings
  • Changed UI in edit options screen (Thanks Alexis for the help!).
  • Speeded up the removing process in FILTER method.

I’m getting several questions what the difference is between the Filter and the Old method used in Dynamic Widgets. Both methods has its advantages and disadvantages. Which method works best for you is something for you to decide. However, I’d recommend not touching the method option, so using the (default) Filter method, when you start using this plugin and see how it performs.

The Filter method controls the widgets before a sidebar is rendered by WordPress. When a sidebar becomes empty (and there are no default widgets set by the theme), the sidebar will not be rendered by WordPress, leaving nothing behind. This is particular very usefull when your theme uses for example a border around the sidebar. Disadavantage of this method is, it has to process all applicable widgets for every sidebar it comes across during the time the page is rendered. When you have many sidebars and/or many options set for the widgets this might slow down the rendering significant.

The Old method controls the widgets at the moment the sidebars are rendering. It deletes the widgets from the sidebar. This can leave you behind with a rendered empty sidebar. When your theme is using borders around it, it will be noticeable, otherwise probably not. This method is faster as the processing is done only once for all sidebars together. This is very useful for users who have many sidebars and/or widgets.

Now what if you have many sidebars and/or widgets, you notice a significant slow down of rendering and also a theme which uses borders around sidebars? Both methods are not really usable at that point. Well, there is a way, but that needs some hacking in your theme involved. You should have some PHP programming expierence before you would ever think about this. You use the Old method for this hack and the PHP output buffering functions. You have to find in your theme files where the sidebar is called. At that point you replace the following example PHP code. Please note this PHP code needs to be adapted to the theme you are using. You can’t just copy – paste! I’m not responisble for any damage caused.

ob_start();
$success = dynamic_sidebar($index);
$content = ob_get_clean();
if ($success) {
  do_output_div($content);
}

When you use the since WordPress 3.0 standard Twenty Ten theme, you should have a look to WP Weaver (also used here) which has this piece of code adapted and other nice features added to this standard theme.

25

Hopefully wordpress.org will co-operate (see my blogentry about the development version problems), the next version of Dynamic Widgets will be released soon. In this version the following has been added and changed:

  • Added l10n support.[1]
  • Added Dutch language files (locale: nl)
  • Added support for WP Shopping Cart / WP E-Commerce Categories.
  • Bugfix for error 404 (file not found) when saving options.
  • Bugfix for unexpected behavior in subsequent category pages.
  • Bugfix for unexpected behavior in single post when using individual exception rules.
  • Bugfix for unexpected behavior in Custom Post Types.
  • Bugfix for incorrect use and display of Custom Post Types in Widget Edit Options screen.
  • Removed several PHP notices.

[1] With version 1.3.6 of Dynamic Widgets I’ve implemented l10n support. Not all text strings are already in the POT file which you can find in the locale directory. The first text strings I have already translated into Dutch. You’re invited to add another translation. When you have a finished translation PO and MO file, please send it to me, so I can include it into the repository.

Note: If you hit into an error 404 not found when trying to download version 1.3.6, please try again later. It looks like wordpress.org is catching up with the sync.