Causing my WordPress functions to execute twice

All right – so the explanation, it turns out, and with hindsight, is quite simple…

Because the href attribute is empty, it is interpreted as a relative URL, the same URL as the current page.

So every time the page loads, the favicon tries to reload the exact same page – resulting in the double code run observed.

Computers are dumb and always do exactly as they are told…