Improved handling of theme action hooks and widget areas