Hi Matt,

you’re welcome.

I use it in a custom plugin that is enabled network-wide. I pasted the code into a (very basic) plugin file that you can use as a starting point: https://gist.github.com/florianbrinkmann/9236134e29c07bb10ae1932d93100984

You could use it as a Must Use plugin (https://codex.wordpress.org/Must_Use_Plugins). For that, just upload it to the wp-content/mu-plugins folder via FTP (you may need to create the mu-plugins directory).

Hope that helps,