I want to automatically generate some menu items using a script (i.e. using
This would usually be a one-off event but I might want to repeat it if the menu items need re-generating.
I guess I could write the script then manually include it in
functions.php when I want it to run. Is there a better way?