In reply to Jake.

Hi Jake,

You have a few options. You can use something like a Code Snippets plugin or a Core Functionality plugin of your own making.

The key is you definitely don't want to add it to an existing plugin that you've installed on your site from the WordPress plugin directory or a theme, particular one that has updates possible (like any from the WordPress directory). In both of those cases, the snippet would be lost when the plugin/theme is updated.