A new WordPress Widgets API is Coming

A new WordPress Widgets API is in development for WordPress 2.8. Well it’s probaby a stratch to called it an API. It’s really just a new class called WP_Widget. It was inspired by the MultiWidget Class, it will handle all the multi-widget functions and hooks to implement a multi-widget Plugin, giving developers an easier process to extend their WordPress Plugins with Widget functionality. The main advantages here seem to be that they are using a proper class and through of bit of standard Object Oriented magic make it much easier to have a widget that is able to have multiple instances. This will mean that you can have more than one of same widget at a time and each can have it’s own values.

The WordPress Development team has announced that they are converting all default WordPress Widgets to work with the new Widgets API.

Lester Chan looks like he modifed his Polls widget with the new WP_Widget Class.  It’s always helpful to have a real world example to look at. His example does inlcude the form() and update() methods which our generated code does not at this time. It might be a bit trick to generate that stuff, but we’re looking into the best approach.

Tags: ,

Hi, Stranger! Leave Your Comment...

Name (required)
Email (required)