Posted By

chrisdpratt on 01/23/10


Tagged

template wordpress widget


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

VladNovo


Create a Wordpress 2.8+ Widget


 / Published in: PHP
 

URL: http://wpengineer.com/wordpress-built-a-widget/

Full example widget available at WP Engineer.

  1. class My_RSS_Widget extends WP_Widget {
  2. function My_RSS_Widget() {
  3. //Constructor
  4. }
  5.  
  6. function widget($args, $instance) {
  7. // prints the widget
  8. }
  9.  
  10. function update($new_instance, $old_instance) {
  11. //save the widget
  12. }
  13.  
  14. function form($instance) {
  15. //widgetform in backend
  16. }
  17. }
  18. register_widget('My_RSS_Widget');

Report this snippet  

You need to login to post a comment.