Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
New Widgets API
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ryan Boren  
View profile  
 More options Mar 26 2009, 7:19 pm
From: Ryan Boren <r...@boren.nu>
Date: Thu, 26 Mar 2009 16:19:50 -0700
Local: Thurs, Mar 26 2009 7:19 pm
Subject: [wp-hackers] New Widgets API
In trunk is a new widgets API.  WP_Widget is a class that abstracts
away much of the complexity involved in writing a widget, especially
multi-widgets. Basically, you extend WP_Widget with your own class
that provides a constructor and three methods -- widget(), form(), and
update().  widget() outputs the actual content of the widget.
update() processes options to be saved.  form() outputs the options
form.  A widget is registered by passing the name of the widget class
to register_widget().  All widgets written with WP_Widget are multiple
instance capable.  Options for old single-instance widgets ported to
WP_Widget will be upgraded to the new multi-option storage format,
which is simply a multi-dimensional array keyed by instance ID.
Options for widgets using the old multi-instance pattern should work
as is.  If your widget has custom option storage needs, you can
provide your own get_settings() and save_settings() methods.

 The WP_Widget source can be viewed here (read the phpdoc for more
info on usage):

http://core.trac.wordpress.org/browser/trunk/wp-includes/widgets.php

You can see examples of how to use it here:

http://core.trac.wordpress.org/browser/trunk/wp-includes/default-widg...

If you author any widgets, try porting them to WP_Widget and give your
feedback on what can be improved.  The trac ticket is:

http://core.trac.wordpress.org/ticket/8441

(Props to the MultiWidget class, on which WP_Widget is based:
http://blog.firetree.net/2008/11/30/wordpress-multi-widget/)
_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joost de Valk  
View profile  
 More options Mar 27 2009, 2:00 am
From: Joost de Valk <jo...@yoast.com>
Date: Fri, 27 Mar 2009 07:00:22 +0100
Local: Fri, Mar 27 2009 2:00 am
Subject: Re: [wp-hackers] New Widgets API
Bless you Ryan, great work!

_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
aesqe  
View profile  
 More options Mar 27 2009, 9:01 am
From: aesqe <ae...@skyphe.org>
Date: Fri, 27 Mar 2009 14:01:52 +0100
Local: Fri, Mar 27 2009 9:01 am
Subject: Re: [wp-hackers] New Widgets API
bless you indeed, this actually looks easy to remember :)

On 27.3.2009 7:00, Joost de Valk wrote:

> Bless you Ryan, great work!

> Ryan Boren wrote:
>> In trunk is a new widgets API.
>> ...

--
-._______________KAWAII!_______________.-
Skyphe.org : It'll all make sense one day
http://skyphe.org .:. http://breedart.org
_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »