[Resolved] functions.php gets called multiple times on dashboard
I noticed that a theme’s functions.php is called numerous times on the dashboard page.
It seems that its called on initialization, and once for each of the following dashboard widgets: Quick Press, Incoming Links, WordPress Blog, Plugins and Other WordPress News.
You can test this yourself by echoing out a simple statement at the top of functions.php.
My question is why does this happen and is it necessary?
For example, if I am including a class in my functions.php, and I instantiate that class, this ends up happening numerous times, even though I only want it to happen once.
Some insight on this would be nice!
- The topic ‘[Resolved] functions.php gets called multiple times on dashboard’ is closed to new replies.