I find myself using many of the same snippets of code for my functions.php
file in new websites.
Is there a method I can use to create a few different shared functions.php
files to use across my websites? I am not referring to a WPMU installation, but completely separate installations of WordPress with separate databases, possibly on different hosts.
For example, if there are functions I want to add to a specific site, I would just add them to the site's own functions.php
, but also have a shared functions.php
file for all my multi-author sites and one for all my single author sites. Another situation would be to group together all similar functions into separate functions.php
files.
UPDATE
Here is an update with an example I found in a premium theme's functions.php
. This is the only code in the functions.php
, so I assume all the functions are pulled from other files.
$themename = 'CoolTheme';
$shortname = 'cooltheme';
include_once TEMPLATEPATH.'/cool_framework/plugins/pagination.php';
include_once TEMPLATEPATH.'/cool_framework/plugins/cool_widgets.php';
include_once TEMPLATEPATH.'/cool_framework/plugins/sidebar_generator.php';
include_once TEMPLATEPATH.'/cool_framework/cool_comments.php';
include_once TEMPLATEPATH.'/cool_framework/cool_functions.php';
include_once TEMPLATEPATH.'/cool_framework/cool_navigation.php';
include_once TEMPLATEPATH.'/cool_framework/cool_panel/cool_panel.php';
include_once TEMPLATEPATH.'/cool_framework/cool_shortcodes/cool_shortcodes.php';
Is something like this possible, except calling the functions from a completely separate domain or cloud storage? If so, what are the issues, if any, I can expect?