Checking how many times a Hook has run in WordPress

Prem Tiwari - - WordPress Snippets


In this tutorial, I am going to share the checking how many times a Hook has run in WordPress. Please keep your close attention in this post to learn about the hook working functionality.

In your WordPress code, there are some hooks that called multiple times on time of code execution, If you only want your callback function to run once, then use the snippet in your WordPress code.


About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.