for class wp_widget, in what order are the member functions called?

It’s hard to tell the order in which these functions are called, because they’re used in different contexts.

WP_Widget class has 4 methods:

  • __construct – it constructs the widget, so it’s always run first
  • widget – it should output the content of given widget, so it’s used on front-end in sidebar, when the widget is printed
  • form – it outputs the options of given widget in admin area, so it’s used in admin, when you edit the widget
  • update – it processes the options form and saves the options, so it’s used in admin, when you save the widget options