Thursday, August 17, 2017

WordPress - init hook seems to be fired more than once

init hook should be fired only once in WP

If it appears as being fired more than once, it's probably because there was a redirect and/or 404 error (even for a PNG, it's going to trigger the full WP Load).

Also, there might be multiprocess/multithread execution. Every page load can run multiple wp processes in case of 404 errors or redirects! And they can enter a race condition!

No comments:

Post a Comment

PSR-1 and PSR-2 coding standards for PHP

Visual aspects of code play a significant role in raising or drowning developer's productivity. In case that there's too much clutte...