Widget Best Practice: Using Functions


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function myplugin_widget_init()
  2. {
  3. // Register myplugin_widget::display() and myplugin_widget::control()
  4. }
  5.  
  6. function myplugin_widget_display()
  7. {
  8. // Echo content
  9. }
  10.  
  11. function myplugin_widget_control()
  12. {
  13. // Echo administration control
  14. }

URL: http://funcdoc.wordpress.com/2008/02/04/writing-wordpress-widget-best-practices/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.