I'm working on a Wordpress multi-site.
I'm using the same functions on each site and so I'm repeating the functions in the function.php on each site.
I have a templates folder in the themes folder at the same level as different themes/sites.
In each site I'm using require to get common structures that are used on all the site that are in the templates folder.
<?php require(locate_template('templates/the_element.php'));?>
Is it possible to do the same sort of thing but with a function.
Can I require a function and pass varaiables in