This is the P2PU Archive. If you want the current site, go to www.p2pu.org!
You haven't posted any discussions yet.
Here is the link for the walkthrough:
As you can see there was some confusion (totally my fault!) about this assignment. Everyone ended up using a poll plugin when in fact the goal was to get people into the creation of a basic widget. If you're interested in that I hope the walkthrough is enough to get you started now :)
Nuno,
Thanks for detailed explanation for widget creation concept.
i also gone through following references
(1) http://www.reynoldsftw.com/2009/01/wordpress-widget-beginners-guide/
(2) http://www.lonewolfdesigns.co.uk/create-wordpress-widgets/
(3) http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creat...
all above reference us
"add_action" function with different 1st argument...like
add_action("plugins_loaded", "myHelloWorld_init");
or
add_action('widgets_init', array($this, 'init_myWidget'));
your walkthrough not use this function.
Nuno! please provide us
- In which case we need to use add_action function?
- What happen if we pass 1st argument as "plugins_loaded" or "widget_loaded"?
thanks
These two hooks (plugins_loaded and widgets_init) are different as Plugins and Widgets are different. Historically, plugins were in Wordpress before Widgets. A plugin does not have to be a widget, but widget is always a plugin.
Read about it on http://notagrouch.com/technophile/wordpress/wordpress-plugins-widgets-di...
For creating widgets you may also use WP_Widget class wchich was introduced in Wordpress 2.8. I use WP_Widget in my submission.
Take look and download the source code: http://p2pu.marblenews.net/