Support » Requests and Feedback » functions.php gets called multiple times on dashboard

  • Resolved User Removed


    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!


Viewing 1 replies (of 1 total)
  • irc member nkuttler: so the ajax calls wp, which creates a new wp instance, which loads the theme, which does the output. i guess it should be possible for you to detect if it is an ajax call.

Viewing 1 replies (of 1 total)
  • The topic ‘functions.php gets called multiple times on dashboard’ is closed to new replies.