Detect when an Action has Run with did_action

Some hooks get fired more than once, meaning that functions connected to those hooks are ran multiple times. This causes problems with some functions when they are designed to only be run once. If you have a function that is connected to an action hook, and you need to ensure it only ever runs once,…