Between functions.php (theme), widgets, and plugins, which is loaded first?

The plugins are loaded right before theme (yes, I’ve been looking for excuse to use this):

enter image description here

However it is wrong to think about either as point of code execution. For most cases everything should be hooked and executed no earlier than init hook. According to Codex widget registration with register_widget() should be hooked to widget_init.

Because of that order of load doesn’t matter for this case, you will have everything loaded by the time widget needs it in any case.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)