Posted By

xavsio4 on 07/05/11


Tagged

wordpress


Versions (?)

Wordpress Widget Structure


 / Published in: PHP
 

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

Report this snippet  

You need to login to post a comment.